extcon: int3496: Use gpiod_get instead of gpiod_get_index
authorHans de Goede <hdegoede@redhat.com>
Fri, 10 Mar 2017 20:52:08 +0000 (21:52 +0100)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 22 Mar 2017 09:29:47 +0000 (18:29 +0900)
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>
drivers/extcon/extcon-intel-int3496.c

index 22a529eb1b1aeeb07beb20f5af2a86a4500998cf..00f0e60a00cedb0e4609fde35389e67e8a0da751 100644 (file)
@@ -108,9 +108,7 @@ static int int3496_probe(struct platform_device *pdev)
        data->dev = dev;
        INIT_DELAYED_WORK(&data->work, int3496_do_usb_id);
 
-       data->gpio_usb_id = devm_gpiod_get_index(dev, "id",
-                                               INT3496_GPIO_USB_ID,
-                                               GPIOD_IN);
+       data->gpio_usb_id = devm_gpiod_get(dev, "id", GPIOD_IN);
        if (IS_ERR(data->gpio_usb_id)) {
                ret = PTR_ERR(data->gpio_usb_id);
                dev_err(dev, "can't request USB ID GPIO: %d\n", ret);
@@ -123,15 +121,11 @@ static int int3496_probe(struct platform_device *pdev)
                return data->usb_id_irq;
        }
 
-       data->gpio_vbus_en = devm_gpiod_get_index(dev, "vbus",
-                                                INT3496_GPIO_VBUS_EN,
-                                                GPIOD_ASIS);
+       data->gpio_vbus_en = devm_gpiod_get(dev, "vbus", GPIOD_ASIS);
        if (IS_ERR(data->gpio_vbus_en))
                dev_info(dev, "can't request VBUS EN GPIO\n");
 
-       data->gpio_usb_mux = devm_gpiod_get_index(dev, "mux",
-                                                INT3496_GPIO_USB_MUX,
-                                                GPIOD_ASIS);
+       data->gpio_usb_mux = devm_gpiod_get(dev, "mux", GPIOD_ASIS);
        if (IS_ERR(data->gpio_usb_mux))
                dev_info(dev, "can't request USB MUX GPIO\n");