diff options
author | Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> | 2018-05-07 13:36:00 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-05-23 09:57:08 +0200 |
commit | a76e865eea9e892466700451ba0ac54b22c039ae (patch) | |
tree | 37546c50fbe07edeb070d1b70489d2c57e8182fa /drivers/gpio/gpio-zynq.c | |
parent | gpio: zynq: Remove call to platform_get_irq (diff) | |
download | linux-a76e865eea9e892466700451ba0ac54b22c039ae.tar.xz linux-a76e865eea9e892466700451ba0ac54b22c039ae.zip |
gpio: zynq: simplifly getting drvdata
Get the driver data directly by dev_get_drvdata.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-zynq.c')
-rw-r--r-- | drivers/gpio/gpio-zynq.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index e20f9cfcdb88..6c61e15cf322 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -665,8 +665,7 @@ static void zynq_gpio_restore_context(struct zynq_gpio *gpio) static int __maybe_unused zynq_gpio_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct zynq_gpio *gpio = platform_get_drvdata(pdev); + struct zynq_gpio *gpio = dev_get_drvdata(dev); struct irq_data *data = irq_get_irq_data(gpio->irq); if (!irqd_is_wakeup_set(data)) { @@ -679,8 +678,7 @@ static int __maybe_unused zynq_gpio_suspend(struct device *dev) static int __maybe_unused zynq_gpio_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct zynq_gpio *gpio = platform_get_drvdata(pdev); + struct zynq_gpio *gpio = dev_get_drvdata(dev); struct irq_data *data = irq_get_irq_data(gpio->irq); int ret; |