diff mbox series

[-next,9/9] ipmi: ipmi_ssif: fix module autoloading

Message ID 20240819113855.787149-10-liuyuntao12@huawei.com
State New
Headers show
Series drivers: fix some module autoloading | expand

Commit Message

Yuntao Liu Aug. 19, 2024, 11:38 a.m. UTC
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from platform_device_id table.

Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
---
 drivers/char/ipmi/ipmi_ssif.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Arnd Bergmann Aug. 19, 2024, 12:03 p.m. UTC | #1
On Mon, Aug 19, 2024, at 13:38, Yuntao Liu wrote:
> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
> based on the alias from platform_device_id table.
>
> Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
> ---

The driver already has a MODULE_ALIAS() with the same string.

I think the MODULE_DEVICE_TABLE() entry is slightly cleaner here,
but it should only have one of the two, not both.

     Arnd
diff mbox series

Patch

diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index 96ad571d041a..e8e7b832c060 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -2085,6 +2085,7 @@  static const struct platform_device_id ssif_plat_ids[] = {
     { "dmi-ipmi-ssif", 0 },
     { }
 };
+MODULE_DEVICE_TABLE(platform, ssif_plat_ids);
 
 static struct platform_driver ipmi_driver = {
 	.driver = {