Skip to content

Commit 1137cee

Browse files
jkrzyszttmlind
authored andcommitted
ARM: OMAP1: ams-delta: Don't request unused GPIOs
GPIOs with no kernel drivers can still be used from user space, don't request them from the board file. Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent 2668331 commit 1137cee

File tree

1 file changed

+1
-39
lines changed

1 file changed

+1
-39
lines changed

arch/arm/mach-omap1/board-ams-delta.c

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -250,39 +250,6 @@ static struct platform_device latch2_gpio_device = {
250250
#define LATCH2_PIN_HOOKFLASH1 14
251251
#define LATCH2_PIN_HOOKFLASH2 15
252252

253-
static const struct gpio latch_gpios[] __initconst = {
254-
{
255-
.gpio = LATCH1_GPIO_BASE + 6,
256-
.flags = GPIOF_OUT_INIT_LOW,
257-
.label = "dockit1",
258-
},
259-
{
260-
.gpio = LATCH1_GPIO_BASE + 7,
261-
.flags = GPIOF_OUT_INIT_LOW,
262-
.label = "dockit2",
263-
},
264-
{
265-
.gpio = AMS_DELTA_GPIO_PIN_SCARD_RSTIN,
266-
.flags = GPIOF_OUT_INIT_LOW,
267-
.label = "scard_rstin",
268-
},
269-
{
270-
.gpio = AMS_DELTA_GPIO_PIN_SCARD_CMDVCC,
271-
.flags = GPIOF_OUT_INIT_LOW,
272-
.label = "scard_cmdvcc",
273-
},
274-
{
275-
.gpio = AMS_DELTA_LATCH2_GPIO_BASE + 14,
276-
.flags = GPIOF_OUT_INIT_LOW,
277-
.label = "hookflash1",
278-
},
279-
{
280-
.gpio = AMS_DELTA_LATCH2_GPIO_BASE + 15,
281-
.flags = GPIOF_OUT_INIT_LOW,
282-
.label = "hookflash2",
283-
},
284-
};
285-
286253
static struct regulator_consumer_supply modem_nreset_consumers[] = {
287254
REGULATOR_SUPPLY("RESET#", "serial8250.1"),
288255
REGULATOR_SUPPLY("POR", "cx20442-codec"),
@@ -862,7 +829,6 @@ static void __init ams_delta_led_init(struct gpio_chip *chip)
862829
static int __init ams_delta_gpio_init(void)
863830
{
864831
struct gpio_chip *chip;
865-
int err;
866832

867833
if (!machine_is_ams_delta())
868834
return -ENODEV;
@@ -873,11 +839,7 @@ static int __init ams_delta_gpio_init(void)
873839
else
874840
ams_delta_led_init(chip);
875841

876-
err = gpio_request_array(latch_gpios, ARRAY_SIZE(latch_gpios));
877-
if (err)
878-
pr_err("Couldn't take over latch1/latch2 GPIO pins\n");
879-
880-
return err;
842+
return 0;
881843
}
882844
device_initcall_sync(ams_delta_gpio_init);
883845

0 commit comments

Comments
 (0)