From: Rosen Penev <rosenp@gmail.com>
To: platform-driver-x86@vger.kernel.org
Cc: "Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] platform/x86: intel: int0002_vgpio: use gpiochip_get_data
Date: Tue, 3 Dec 2024 15:35:05 -0800 [thread overview]
Message-ID: <20241203233505.184612-1-rosenp@gmail.com> (raw)
Instead of using container_of, we can pass the pointer to
gpiochip_add_data and use it.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/platform/x86/intel/int0002_vgpio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/intel/int0002_vgpio.c b/drivers/platform/x86/intel/int0002_vgpio.c
index 0cc80603a8a9..7ce0774b3896 100644
--- a/drivers/platform/x86/intel/int0002_vgpio.c
+++ b/drivers/platform/x86/intel/int0002_vgpio.c
@@ -102,7 +102,7 @@ static void int0002_irq_mask(struct irq_data *data)
static int int0002_irq_set_wake(struct irq_data *data, unsigned int on)
{
struct gpio_chip *chip = irq_data_get_irq_chip_data(data);
- struct int0002_data *int0002 = container_of(chip, struct int0002_data, chip);
+ struct int0002_data *int0002 = gpiochip_get_data(chip);
/*
* Applying of the wakeup flag to our parent IRQ is delayed till system
@@ -211,7 +211,7 @@ static int int0002_probe(struct platform_device *pdev)
girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_edge_irq;
- ret = devm_gpiochip_add_data(dev, chip, NULL);
+ ret = devm_gpiochip_add_data(dev, chip, int0002);
if (ret) {
dev_err(dev, "Error adding gpio chip: %d\n", ret);
return ret;
--
2.47.0
next reply other threads:[~2024-12-03 23:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 23:35 Rosen Penev [this message]
2024-12-04 13:19 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241203233505.184612-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®