Skip to contentSkip to conversation

platform/x86: mlx-platform: fix module aliases

PATCH In review Ivan Vecera 3 participants 4 messages Jan 22, 2018 – Feb 1, 2018 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH v3 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) v3 - MODULE_DEVICE_TABLE moved after mlxplat_dmi_table declaration

Fixes 6613d18e9038 ("platform/x86: mlx-platform: Move module from arch/x86")
Cc Vadim Pasternak <[email protected]>
Cc Bjørn Mork <[email protected]>
Cc Andy Shevchenko <[email protected]>
---
 drivers/platform/x86/mlx-platform.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/platform/x86/mlx-platform.c +2 -5
index 504256c3660d..22cd011f6aee 100644
@@ -286,6 +286,8 @@ static const struct dmi_system_id mlxplat_dmi_table[] __initconst = {
 	{ }
 };
 
+MODULE_DEVICE_TABLE(dmi, mlxplat_dmi_table);
+
 static int __init mlxplat_init(void)
 {
 	struct mlxplat_priv *priv;
@@ -370,8 +372,3 @@ 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*:");
Signature · 1 line
2.13.6
Acked-by on v3 1/1
#1 lore raw
Quoted 18 lines

-----Original Message-----
From: Ivan Vecera [mailto:[email protected]]
Sent: Monday, January 22, 2018 4:21 PM
To: [email protected]
Cc: Vadim Pasternak <[email protected]>; Bjørn Mork <[email protected]>; Andy Shevchenko <[email protected]>
Subject: [PATCH v3] 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) v3 - MODULE_DEVICE_TABLE moved after mlxplat_dmi_table declaration

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

arch/x86")

Cc Vadim Pasternak <[email protected]>
Cc Bjørn Mork <[email protected]>
Cc Andy Shevchenko <[email protected]>
Quoted 29 lines
---
 drivers/platform/x86/mlx-platform.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/platform/x86/mlx- renamed from drivers/platform/x86/mlx-platform.c +0 -0

platform.c
index 504256c3660d..22cd011f6aee 100644

drivers/platform/x86/mlx-platform.c +2 -0
@@ -286,6 +286,8 @@ static const struct dmi_system_id mlxplat_dmi_table[]
 __initconst = {
 	{ }
 };
 
+MODULE_DEVICE_TABLE(dmi, mlxplat_dmi_table);
+
 static int __init mlxplat_init(void)
 {
drivers/platform/x86/mlx-platform.c +0 -0
 	struct mlxplat_priv *priv;
@@ -370,8 +372,3 @@ 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 +0 -5
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN27*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSB*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSX*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN21*:");
--

2.13.6

#2 lore raw
In reply to Ivan Vecera
Quoted 10 lines

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

Quoted 3 lines

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.

Darren/Andy,
Since mlx-platform is about to be modified in for-next, how to proceed on this patch? Could I resend it based on top of the latest version?

Quoted 40 lines

Changes:
v2 - conversion to usage of MODULE_DEVICE_TABLE (thanks Bjørn) v3 - MODULE_DEVICE_TABLE moved after mlxplat_dmi_table declaration

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

arch/x86")

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

platform.c
index 504256c3660d..22cd011f6aee 100644

drivers/platform/x86/mlx-platform.c +2 -0
@@ -286,6 +286,8 @@ static const struct dmi_system_id mlxplat_dmi_table[]
 __initconst = {
 	{ }
 };
 
+MODULE_DEVICE_TABLE(dmi, mlxplat_dmi_table);
+
 static int __init mlxplat_init(void)
 {
drivers/platform/x86/mlx-platform.c +0 -0
 	struct mlxplat_priv *priv;
@@ -370,8 +372,3 @@ 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 +0 -5
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN27*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSB*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSX*:");
-MODULE_ALIAS("dmi:*:*Mellanox*:MSN21*:");
--

2.13.6

#3 lore raw
Quoted 13 lines · Vadim Pasternak
Quoted 7 lines

-----Original Message-----
From: Ivan Vecera [mailto:[email protected]]
Sent: Monday, January 22, 2018 4:21 PM
To: [email protected]
Cc: Vadim Pasternak <[email protected]>; Bjørn Mork

<[email protected]>;

Quoted 4 lines

Andy Shevchenko <[email protected]>
Subject: [PATCH v3] platform/x86: mlx-platform: fix module aliases

Missing prefix 'pn' in MODULE_ALIAS lines causes that the module is

not loaded

Quoted 8 lines
Quoted 1 line

automatically. The driver should use MODULE_DEVICE_TABLE together

with

Quoted 1 line

existing mlxplat_dmi_table instead.

Darren/Andy,
Since mlx-platform is about to be modified in for-next, how to proceed on this
patch? Could I resend it based on top of the latest version?

This patch is applied in testing already.

Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity.