diff mbox series

[3/4] mailbox: mpfs-mbox: fix driver bug and cleanup

Message ID 20260518141712.3597880-4-jamie.gibbons@microchip.com
State Accepted
Delegated to: Andes
Headers show
Series mailbox: mpfs-mbox: fixes and syscon support | expand

Commit Message

Jamie Gibbons May 18, 2026, 2:17 p.m. UTC
Remove an unused and invalid struct mbox_chan pointer from the private
data and fix incorrect memory handling in the probe path, where the
private data structure was allocated.

This change corrects a functional bugs and cleans up the driver without
altering its behavior.

Fixes: 111e9bf6a5ac ("mailbox: add PolarFire SoC mailbox driver")
Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
---
 drivers/mailbox/mpfs-mbox.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/mailbox/mpfs-mbox.c b/drivers/mailbox/mpfs-mbox.c
index 2e20b08307c..08c51c96718 100644
--- a/drivers/mailbox/mpfs-mbox.c
+++ b/drivers/mailbox/mpfs-mbox.c
@@ -37,13 +37,12 @@  struct mpfs_mbox {
 	struct udevice *dev;
 	void __iomem *ctrl_base;
 	void __iomem *mbox_base;
-	struct mbox_chan *chan;
 };
 
 static bool mpfs_mbox_busy(struct mbox_chan *chan)
 {
 	struct mpfs_mbox *mbox = dev_get_priv(chan->dev);
-	uint16_t status;
+	u32 status;
 
 	status = readl(mbox->ctrl_base + SERVICES_SR_OFFSET);
 
@@ -152,7 +151,6 @@  static int mpfs_mbox_probe(struct udevice *dev)
 	mbox->mbox_base = devm_ioremap(dev, res.start, resource_size(&res));
 
 	mbox->dev = dev;
-	mbox->chan->con_priv = mbox;
 
 	return 0;
 }