[2/2] gpio: zynq: simplifly getting drvdata

Message ID 1525687749-14813-2-git-send-email-shubhrajyoti.datta@xilinx.com
State New
Headers show
Series
  • [1/2] gpio: zynq: Remove call to platform_get_irq
Related show

Commit Message

Shubhrajyoti Datta May 7, 2018, 10:09 a.m.
Get the driver data directly by dev_get_drvdata.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
 drivers/gpio/gpio-zynq.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--
2.1.1

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Linus Walleij May 16, 2018, 12:57 p.m. | #1
On Mon, May 7, 2018 at 12:09 PM, Shubhrajyoti Datta
<shubhrajyoti.datta@xilinx.com> wrote:

> Get the driver data directly by dev_get_drvdata.
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>

This does not apply to my GPIO tree, please rebase it
and resend.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 7551857..479ac87 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -676,8 +676,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)) {
@@ -690,8 +689,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;