summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-zynq.c
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>2018-05-07 12:36:54 +0200
committerLinus Walleij <linus.walleij@linaro.org>2018-05-23 09:55:53 +0200
commit5e3a8ecd7614d5432b2db4f59fd6b119439aa226 (patch)
tree16e1acd9088a91f63a5f2ada1d27ccdc08b1eb82 /drivers/gpio/gpio-zynq.c
parentgpio: Convert to use match_string() helper (diff)
downloadlinux-5e3a8ecd7614d5432b2db4f59fd6b119439aa226.tar.xz
linux-5e3a8ecd7614d5432b2db4f59fd6b119439aa226.zip
gpio: zynq: Remove call to platform_get_irq
Remove the call to platform_get_irq use the cached one instead. 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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 75ee877e5cd5..e20f9cfcdb88 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -666,9 +666,8 @@ 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);
- int irq = platform_get_irq(pdev, 0);
- struct irq_data *data = irq_get_irq_data(irq);
struct zynq_gpio *gpio = platform_get_drvdata(pdev);
+ struct irq_data *data = irq_get_irq_data(gpio->irq);
if (!irqd_is_wakeup_set(data)) {
zynq_gpio_save_context(gpio);
@@ -681,9 +680,8 @@ 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);
- int irq = platform_get_irq(pdev, 0);
- struct irq_data *data = irq_get_irq_data(irq);
struct zynq_gpio *gpio = platform_get_drvdata(pdev);
+ struct irq_data *data = irq_get_irq_data(gpio->irq);
int ret;
if (!irqd_is_wakeup_set(data)) {