Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: gpio-tegra: simplify getting .driver_data

We should get 'driver_data' from 'struct device' directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Wolfram Sang and committed by
Linus Walleij
7ddb7dce 38ccad02

+2 -4
+2 -4
drivers/gpio/gpio-tegra.c
··· 404 404 #ifdef CONFIG_PM_SLEEP 405 405 static int tegra_gpio_resume(struct device *dev) 406 406 { 407 - struct platform_device *pdev = to_platform_device(dev); 408 - struct tegra_gpio_info *tgi = platform_get_drvdata(pdev); 407 + struct tegra_gpio_info *tgi = dev_get_drvdata(dev); 409 408 unsigned long flags; 410 409 unsigned int b, p; 411 410 ··· 443 444 444 445 static int tegra_gpio_suspend(struct device *dev) 445 446 { 446 - struct platform_device *pdev = to_platform_device(dev); 447 - struct tegra_gpio_info *tgi = platform_get_drvdata(pdev); 447 + struct tegra_gpio_info *tgi = dev_get_drvdata(dev); 448 448 unsigned long flags; 449 449 unsigned int b, p; 450 450