Skip to content

Commit 9be0224

Browse files
MrVanJassi Brar
authored andcommitted
mailbox: Remove devm_mbox_controller_unregister
Commit e898d9c("mailbox: Add device-managed registration functions") introduced device-managed API for mailbox, but in the past 7 years, there is no user for devm_mbox_controller_unregister. So remove it. Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent cb7e2ec commit 9be0224

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

drivers/mailbox/mailbox.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -587,16 +587,6 @@ static void __devm_mbox_controller_unregister(struct device *dev, void *res)
587587
mbox_controller_unregister(*mbox);
588588
}
589589

590-
static int devm_mbox_controller_match(struct device *dev, void *res, void *data)
591-
{
592-
struct mbox_controller **mbox = res;
593-
594-
if (WARN_ON(!mbox || !*mbox))
595-
return 0;
596-
597-
return *mbox == data;
598-
}
599-
600590
/**
601591
* devm_mbox_controller_register() - managed mbox_controller_register()
602592
* @dev: device owning the mailbox controller being registered
@@ -632,20 +622,3 @@ int devm_mbox_controller_register(struct device *dev,
632622
return 0;
633623
}
634624
EXPORT_SYMBOL_GPL(devm_mbox_controller_register);
635-
636-
/**
637-
* devm_mbox_controller_unregister() - managed mbox_controller_unregister()
638-
* @dev: device owning the mailbox controller being unregistered
639-
* @mbox: mailbox controller being unregistered
640-
*
641-
* This function unregisters the mailbox controller and removes the device-
642-
* managed resource that was set up to automatically unregister the mailbox
643-
* controller on driver probe failure or driver removal. It's typically not
644-
* necessary to call this function.
645-
*/
646-
void devm_mbox_controller_unregister(struct device *dev, struct mbox_controller *mbox)
647-
{
648-
WARN_ON(devres_release(dev, __devm_mbox_controller_unregister,
649-
devm_mbox_controller_match, mbox));
650-
}
651-
EXPORT_SYMBOL_GPL(devm_mbox_controller_unregister);

include/linux/mailbox_controller.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,4 @@ void mbox_chan_txdone(struct mbox_chan *chan, int r); /* atomic */
134134

135135
int devm_mbox_controller_register(struct device *dev,
136136
struct mbox_controller *mbox);
137-
void devm_mbox_controller_unregister(struct device *dev,
138-
struct mbox_controller *mbox);
139-
140137
#endif /* __MAILBOX_CONTROLLER_H */

0 commit comments

Comments
 (0)