gpio/gpio-omap: Use existing pointer to struct device
authorTobias Klauser <tklauser@distanz.ch>
Fri, 5 Oct 2012 09:37:38 +0000 (11:37 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 15 Oct 2012 18:50:13 +0000 (20:50 +0200)
A pointer to "pdev->dev" is already stored in "dev", so use it in
devm_kzalloc.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-omap.c

index 94cbc84..eb73dee 100644 (file)
@@ -1070,7 +1070,7 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev)
        if (!pdata)
                return -EINVAL;
 
-       bank = devm_kzalloc(&pdev->dev, sizeof(struct gpio_bank), GFP_KERNEL);
+       bank = devm_kzalloc(dev, sizeof(struct gpio_bank), GFP_KERNEL);
        if (!bank) {
                dev_err(dev, "Memory alloc failed\n");
                return -ENOMEM;