From: Tobias Klauser Date: Fri, 5 Oct 2012 09:37:38 +0000 (+0200) Subject: gpio/gpio-omap: Use existing pointer to struct device X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=086d585f13542de205c25fd225a37aa0cadc3be0;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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: Tobias Klauser Acked-by: Kevin Hilman Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 94cbc842fbc3..eb73dee0ab33 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -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;