Skip to content

Commit 59902d6

Browse files
committed
Pisound: Don't export the button GPIO via sysfs GPIO class.
Signed-off-by: Giedrius Trainavičius <giedrius@blokas.io>
1 parent 04b88e1 commit 59902d6

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

sound/soc/bcm/pisound.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,6 @@ static int pisnd_ctl_uninit(void)
857857

858858
static struct gpio_desc *osr0, *osr1, *osr2;
859859
static struct gpio_desc *reset;
860-
static struct gpio_desc *button;
861860

862861
static int pisnd_hw_params(
863862
struct snd_pcm_substream *substream,
@@ -1016,8 +1015,6 @@ static int pisnd_init_gpio(struct device *dev)
10161015

10171016
reset = gpiod_get_index(dev, "reset", 0, GPIOD_ASIS);
10181017

1019-
button = gpiod_get_index(dev, "button", 0, GPIOD_ASIS);
1020-
10211018
gpiod_direction_output(osr0, 1);
10221019
gpiod_direction_output(osr1, 1);
10231020
gpiod_direction_output(osr2, 1);
@@ -1029,8 +1026,6 @@ static int pisnd_init_gpio(struct device *dev)
10291026
gpiod_set_value(osr2, false);
10301027
gpiod_set_value(reset, true);
10311028

1032-
gpiod_export(button, false);
1033-
10341029
return 0;
10351030
}
10361031

@@ -1039,11 +1034,9 @@ static int pisnd_uninit_gpio(void)
10391034
int i;
10401035

10411036
struct gpio_desc **gpios[] = {
1042-
&osr0, &osr1, &osr2, &reset, &button,
1037+
&osr0, &osr1, &osr2, &reset,
10431038
};
10441039

1045-
gpiod_unexport(button);
1046-
10471040
for (i = 0; i < ARRAY_SIZE(gpios); ++i) {
10481041
if (*gpios[i] == NULL) {
10491042
printd("weird, GPIO[%d] is NULL already\n", i);

0 commit comments

Comments
 (0)