Skip to contentSkip to conversation

platform/x86: mlx-platform: fix module aliases

PATCH Superseded Ivan Vecera 3 participants 4 messages Jan 22, 2018 x86 platform drivers

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 platform/x86: mlx-platform: fix module aliases

Missing prefix 'pn' in MODULE_ALIAS lines causes that the module is not loaded automatically. The driver should use MODULE_DEVICE_TABLE together with existing mlxplat_dmi_table instead.

Changes:
v2 - conversion to usage of MODULE_DEVICE_TABLE (thanks Bjørn)

Fixes 6613d18e9038 ("platform/x86: mlx-platform: Move module from arch/x86")
Cc Vadim Pasternak <[email protected]>
Cc Bjørn Mork <[email protected]>
---
 drivers/platform/x86/mlx-platform.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/platform/x86/mlx-platform.c +1 -5
index 504256c3660d..5a8b475668fb 100644
@@ -370,8 +370,4 @@ module_exit(mlxplat_exit);
 MODULE_AUTHOR("Vadim Pasternak ([email protected])");
 MODULE_DESCRIPTION("Mellanox platform driver");
 MODULE_LICENSE("Dual BSD/GPL");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN24*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN27*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSB*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSX*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN21*:");
+MODULE_DEVICE_TABLE(dmi, mlxplat_dmi_table);
Signature · 1 line
2.13.6
#1 lore raw
Quoted 34 lines

-----Original Message-----
From: Ivan Vecera [mailto:[email protected]]
Sent: Monday, January 22, 2018 12:12 PM
To: [email protected]
Cc: Vadim Pasternak <[email protected]>; Bjørn Mork <[email protected]>
Subject: [PATCH v2] platform/x86: mlx-platform: fix module aliases

Missing prefix 'pn' in MODULE_ALIAS lines causes that the module is not loaded automatically. The driver should use MODULE_DEVICE_TABLE together with existing mlxplat_dmi_table instead.

Changes:
v2 - conversion to usage of MODULE_DEVICE_TABLE (thanks Bjørn)

Fixes 6613d18e9038 ("platform/x86: mlx-platform: Move module from

arch/x86")

Cc Vadim Pasternak <[email protected]>
Cc Bjørn Mork <[email protected]>
---
 drivers/platform/x86/mlx-platform.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/platform/x86/mlx- renamed from drivers/platform/x86/mlx-platform.c +0 -0

platform.c
index 504256c3660d..5a8b475668fb 100644

drivers/platform/x86/mlx-platform.c +0 -0
@@ -370,8 +370,4 @@ module_exit(mlxplat_exit);  MODULE_AUTHOR("Vadim

Pasternak ([email protected])"); MODULE_DESCRIPTION("Mellanox platform driver"); MODULE_LICENSE("Dual BSD/GPL"); - MODULE_ALIAS("dmi:*:*Mellanox*:MSN24*:");

drivers/platform/x86/mlx-platform.c module_exit(mlxplat_exit); · line 373

Quoted 5 lines
drivers/platform/x86/mlx-platform.c +1 -4
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN27*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSB*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSX*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN21*:");
+MODULE_DEVICE_TABLE(dmi, mlxplat_dmi_table);

I am not sure about the location of MODULE_DEVICE_TABLE record. Should it be placed at the end of the module or after mlxplat_dmi_table declaration?

Quoted 2 lines

--
2.13.6

#2 lore raw
Quoted 5 lines · Vadim Pasternak
Quoted 1 line

+MODULE_DEVICE_TABLE(dmi, mlxplat_dmi_table);

I am not sure about the location of MODULE_DEVICE_TABLE record. Should it be placed at the end of the module or after mlxplat_dmi_table declaration?

Yeah, it would be better.
I dunno if Darren is going to ask for another version or fix this manually when apply.
To be on the safer side, send a v3 with properly attached line as Vadim suggested.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 8 lines · Andy Shevchenko
Quoted 5 lines · Vadim Pasternak
Quoted 1 line

+MODULE_DEVICE_TABLE(dmi, mlxplat_dmi_table);

I am not sure about the location of MODULE_DEVICE_TABLE record. Should it be placed at the end of the module or after mlxplat_dmi_table declaration?

Quoted 6 lines

Yeah, it would be better.
I dunno if Darren is going to ask for another version or fix this manually when apply.
To be on the safer side, send a v3 with properly attached line as Vadim suggested.

Will do.

Thanks,
I.