Commit 086d585f authored by Tobias Klauser's avatar Tobias Klauser Committed by Linus Walleij

gpio/gpio-omap: Use existing pointer to struct device

A pointer to "pdev->dev" is already stored in "dev", so use it in
devm_kzalloc.
Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Acked-by: default avatarKevin Hilman <khilman@ti.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 8944df72
...@@ -1070,7 +1070,7 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev) ...@@ -1070,7 +1070,7 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev)
if (!pdata) if (!pdata)
return -EINVAL; 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) { if (!bank) {
dev_err(dev, "Memory alloc failed\n"); dev_err(dev, "Memory alloc failed\n");
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment