Merge tag 'irqchip-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm...
[linux-2.6-microblaze.git] / drivers / gpio / gpio-janz-ttl.c
index 6b5b5a8..cdf50e4 100644 (file)
@@ -140,18 +140,17 @@ static void ttl_setup_device(struct ttl_module *mod)
 static int ttl_probe(struct platform_device *pdev)
 {
        struct janz_platform_data *pdata;
-       struct device *dev = &pdev->dev;
        struct ttl_module *mod;
        struct gpio_chip *gpio;
        int ret;
 
        pdata = dev_get_platdata(&pdev->dev);
        if (!pdata) {
-               dev_err(dev, "no platform data\n");
+               dev_err(&pdev->dev, "no platform data\n");
                return -ENXIO;
        }
 
-       mod = devm_kzalloc(dev, sizeof(*mod), GFP_KERNEL);
+       mod = devm_kzalloc(&pdev->dev, sizeof(*mod), GFP_KERNEL);
        if (!mod)
                return -ENOMEM;
 
@@ -177,9 +176,9 @@ static int ttl_probe(struct platform_device *pdev)
        gpio->base = -1;
        gpio->ngpio = 20;
 
-       ret = devm_gpiochip_add_data(dev, gpio, NULL);
+       ret = devm_gpiochip_add_data(&pdev->dev, gpio, NULL);
        if (ret) {
-               dev_err(dev, "unable to add GPIO chip\n");
+               dev_err(&pdev->dev, "unable to add GPIO chip\n");
                return ret;
        }