diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-10-21 16:00:30 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-11-05 03:33:32 -0500 |
commit | 9f540c3e1d6668d9507f18107dc63113b9a675be (patch) | |
tree | 17b2d292027e237234afe2ca11282e7c3da88930 | |
parent | 651022382c7f8da46cb4872a545ee1da6d097d2a (diff) |
pinctrl: pinctrl-amd: 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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/pinctrl/pinctrl-amd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c index 67718b0f978d..2a7d638978d8 100644 --- a/drivers/pinctrl/pinctrl-amd.c +++ b/drivers/pinctrl/pinctrl-amd.c | |||
@@ -791,8 +791,7 @@ static bool amd_gpio_should_save(struct amd_gpio *gpio_dev, unsigned int pin) | |||
791 | 791 | ||
792 | static int amd_gpio_suspend(struct device *dev) | 792 | static int amd_gpio_suspend(struct device *dev) |
793 | { | 793 | { |
794 | struct platform_device *pdev = to_platform_device(dev); | 794 | struct amd_gpio *gpio_dev = dev_get_drvdata(dev); |
795 | struct amd_gpio *gpio_dev = platform_get_drvdata(pdev); | ||
796 | struct pinctrl_desc *desc = gpio_dev->pctrl->desc; | 795 | struct pinctrl_desc *desc = gpio_dev->pctrl->desc; |
797 | int i; | 796 | int i; |
798 | 797 | ||
@@ -810,8 +809,7 @@ static int amd_gpio_suspend(struct device *dev) | |||
810 | 809 | ||
811 | static int amd_gpio_resume(struct device *dev) | 810 | static int amd_gpio_resume(struct device *dev) |
812 | { | 811 | { |
813 | struct platform_device *pdev = to_platform_device(dev); | 812 | struct amd_gpio *gpio_dev = dev_get_drvdata(dev); |
814 | struct amd_gpio *gpio_dev = platform_get_drvdata(pdev); | ||
815 | struct pinctrl_desc *desc = gpio_dev->pctrl->desc; | 813 | struct pinctrl_desc *desc = gpio_dev->pctrl->desc; |
816 | int i; | 814 | int i; |
817 | 815 | ||