Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mailbox: Remove devm_mbox_controller_unregister

Commit e898d9cdd3a9("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 <peng.fan@nxp.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>

authored by

Peng Fan and committed by
Jassi Brar
9be02247 cb7e2ec3

-30
-27
drivers/mailbox/mailbox.c
··· 587 587 mbox_controller_unregister(*mbox); 588 588 } 589 589 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 - 600 590 /** 601 591 * devm_mbox_controller_register() - managed mbox_controller_register() 602 592 * @dev: device owning the mailbox controller being registered ··· 622 632 return 0; 623 633 } 624 634 EXPORT_SYMBOL_GPL(devm_mbox_controller_register); 625 - 626 - /** 627 - * devm_mbox_controller_unregister() - managed mbox_controller_unregister() 628 - * @dev: device owning the mailbox controller being unregistered 629 - * @mbox: mailbox controller being unregistered 630 - * 631 - * This function unregisters the mailbox controller and removes the device- 632 - * managed resource that was set up to automatically unregister the mailbox 633 - * controller on driver probe failure or driver removal. It's typically not 634 - * necessary to call this function. 635 - */ 636 - void devm_mbox_controller_unregister(struct device *dev, struct mbox_controller *mbox) 637 - { 638 - WARN_ON(devres_release(dev, __devm_mbox_controller_unregister, 639 - devm_mbox_controller_match, mbox)); 640 - } 641 - EXPORT_SYMBOL_GPL(devm_mbox_controller_unregister);
-3
include/linux/mailbox_controller.h
··· 134 134 135 135 int devm_mbox_controller_register(struct device *dev, 136 136 struct mbox_controller *mbox); 137 - void devm_mbox_controller_unregister(struct device *dev, 138 - struct mbox_controller *mbox); 139 - 140 137 #endif /* __MAILBOX_CONTROLLER_H */