Commit a76e865e authored by Shubhrajyoti Datta's avatar Shubhrajyoti Datta Committed by Linus Walleij

gpio: zynq: simplifly getting drvdata

Get the driver data directly by dev_get_drvdata.
Signed-off-by: default avatarShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Reviewed-by: default avatarMichal Simek <michal.simek@xilinx.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 5e3a8ecd
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment