Skip to content

Commit

Permalink
gpio/gpio-omap: Use existing pointer to struct device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tobias Klauser authored and Linus Walleij committed Oct 15, 2012
1 parent 8944df7 commit 086d585
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 086d585

Please sign in to comment.