mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Jassi Brar <jassisinghbrar@gmail.com>
Subject: [PATCH] mailbox: bcm-pdc: pass pdc_state to irq handler
Date: Mon, 31 Aug 2026 17:45:07 -0700	[thread overview]
Message-ID: <20260901004507.50655-1-rosenp@gmail.com> (raw)

The irq handler takes a struct device pointer and calls
dev_get_drvdata() to recover the driver data.  Pass the driver
data directly as the devm_request_irq() argument instead, dropping
the cast and the dev_get_drvdata() call.

Assisted-by: opencode:deepseek-v4-flash-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/mailbox/bcm-pdc-mailbox.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mailbox/bcm-pdc-mailbox.c b/drivers/mailbox/bcm-pdc-mailbox.c
index 6fcc4002ad4f..1983cc95645c 100644
--- a/drivers/mailbox/bcm-pdc-mailbox.c
+++ b/drivers/mailbox/bcm-pdc-mailbox.c
@@ -935,8 +935,7 @@ static int pdc_rx_list_sg_add(struct pdc_state *pdcs, struct scatterlist *sg)
  */
 static irqreturn_t pdc_irq_handler(int irq, void *data)
 {
-	struct device *dev = (struct device *)data;
-	struct pdc_state *pdcs = dev_get_drvdata(dev);
+	struct pdc_state *pdcs = data;
 	u32 intstatus = ioread32(pdcs->pdc_reg_vbase + PDC_INTSTATUS_OFFSET);
 
 	if (unlikely(intstatus == 0))
@@ -1402,7 +1401,7 @@ static int pdc_interrupts_init(struct pdc_state *pdcs)
 		dev_name(dev), pdcs->pdc_irq, pdcs);
 
 	err = devm_request_irq(dev, pdcs->pdc_irq, pdc_irq_handler, 0,
-			       dev_name(dev), dev);
+			       dev_name(dev), pdcs);
 	if (err)
 		return err;
 	return PDC_SUCCESS;
-- 
2.55.0


                 reply	other threads:[~2026-09-01  0:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260901004507.50655-1-rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-kernel@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®