Skip to content

Commit 408c5b4

Browse files
jwrdegoedechanwoochoi
authored andcommitted
extcon: int3496: Use gpiod_get instead of gpiod_get_index
Now that we've an acpi mapping table we should be using gpiod_get instead of gpiod_get_index. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
1 parent 059c787 commit 408c5b4

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

drivers/extcon/extcon-intel-int3496.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ static int int3496_probe(struct platform_device *pdev)
108108
data->dev = dev;
109109
INIT_DELAYED_WORK(&data->work, int3496_do_usb_id);
110110

111-
data->gpio_usb_id = devm_gpiod_get_index(dev, "id",
112-
INT3496_GPIO_USB_ID,
113-
GPIOD_IN);
111+
data->gpio_usb_id = devm_gpiod_get(dev, "id", GPIOD_IN);
114112
if (IS_ERR(data->gpio_usb_id)) {
115113
ret = PTR_ERR(data->gpio_usb_id);
116114
dev_err(dev, "can't request USB ID GPIO: %d\n", ret);
@@ -123,15 +121,11 @@ static int int3496_probe(struct platform_device *pdev)
123121
return data->usb_id_irq;
124122
}
125123

126-
data->gpio_vbus_en = devm_gpiod_get_index(dev, "vbus",
127-
INT3496_GPIO_VBUS_EN,
128-
GPIOD_ASIS);
124+
data->gpio_vbus_en = devm_gpiod_get(dev, "vbus", GPIOD_ASIS);
129125
if (IS_ERR(data->gpio_vbus_en))
130126
dev_info(dev, "can't request VBUS EN GPIO\n");
131127

132-
data->gpio_usb_mux = devm_gpiod_get_index(dev, "mux",
133-
INT3496_GPIO_USB_MUX,
134-
GPIOD_ASIS);
128+
data->gpio_usb_mux = devm_gpiod_get(dev, "mux", GPIOD_ASIS);
135129
if (IS_ERR(data->gpio_usb_mux))
136130
dev_info(dev, "can't request USB MUX GPIO\n");
137131

0 commit comments

Comments
 (0)