aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2017-03-10 15:52:08 -0500
committerChanwoo Choi <cw00.choi@samsung.com>2017-03-22 05:29:47 -0400
commit408c5b41d215b317ab58c98b959454407ee4a53d (patch)
treeb8b216946741781fa1b3157c2a3c11763e993b6b
parent059c7874b87575e48d2c7702849ff56017059195 (diff)
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 <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
-rw-r--r--drivers/extcon/extcon-intel-int3496.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c
index 22a529eb1b1a..00f0e60a00ce 100644
--- a/drivers/extcon/extcon-intel-int3496.c
+++ b/drivers/extcon/extcon-intel-int3496.c
@@ -108,9 +108,7 @@ static int int3496_probe(struct platform_device *pdev)
108 data->dev = dev; 108 data->dev = dev;
109 INIT_DELAYED_WORK(&data->work, int3496_do_usb_id); 109 INIT_DELAYED_WORK(&data->work, int3496_do_usb_id);
110 110
111 data->gpio_usb_id = devm_gpiod_get_index(dev, "id", 111 data->gpio_usb_id = devm_gpiod_get(dev, "id", GPIOD_IN);
112 INT3496_GPIO_USB_ID,
113 GPIOD_IN);
114 if (IS_ERR(data->gpio_usb_id)) { 112 if (IS_ERR(data->gpio_usb_id)) {
115 ret = PTR_ERR(data->gpio_usb_id); 113 ret = PTR_ERR(data->gpio_usb_id);
116 dev_err(dev, "can't request USB ID GPIO: %d\n", ret); 114 dev_err(dev, "can't request USB ID GPIO: %d\n", ret);
@@ -123,15 +121,11 @@ static int int3496_probe(struct platform_device *pdev)
123 return data->usb_id_irq; 121 return data->usb_id_irq;
124 } 122 }
125 123
126 data->gpio_vbus_en = devm_gpiod_get_index(dev, "vbus", 124 data->gpio_vbus_en = devm_gpiod_get(dev, "vbus", GPIOD_ASIS);
127 INT3496_GPIO_VBUS_EN,
128 GPIOD_ASIS);
129 if (IS_ERR(data->gpio_vbus_en)) 125 if (IS_ERR(data->gpio_vbus_en))
130 dev_info(dev, "can't request VBUS EN GPIO\n"); 126 dev_info(dev, "can't request VBUS EN GPIO\n");
131 127
132 data->gpio_usb_mux = devm_gpiod_get_index(dev, "mux", 128 data->gpio_usb_mux = devm_gpiod_get(dev, "mux", GPIOD_ASIS);
133 INT3496_GPIO_USB_MUX,
134 GPIOD_ASIS);
135 if (IS_ERR(data->gpio_usb_mux)) 129 if (IS_ERR(data->gpio_usb_mux))
136 dev_info(dev, "can't request USB MUX GPIO\n"); 130 dev_info(dev, "can't request USB MUX GPIO\n");
137 131