mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mailbox: bcm-pdc: pass pdc_state to irq handler
@ 2026-09-01  0:45 Rosen Penev
  0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-09-01  0:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jassi Brar

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-01  0:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-01  0:45 [PATCH] mailbox: bcm-pdc: pass pdc_state to irq handler Rosen Penev

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®