i2c: hix5hd2: Fix modalias to make module auto-loading work
PATCH 1/1 i2c: hix5hd2: Fix modalias to make module auto-loading work
Make the modalias match driver name, this is required to make module auto-loading work.
--- drivers/i2c/busses/i2c-hix5hd2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-hix5hd2.c +1 -1
@@ -554,4 +554,4 @@ module_platform_driver(hix5hd2_i2c_driver);MODULE_DESCRIPTION ("Hix5hd2 I2C Bus driver" );MODULE_AUTHOR ("Wei Yan <[email protected]>" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:i2c-hix5hd2" ); +MODULE_ALIAS ("platform:hix5hd2-i2c" );
Signature · 1 line
2.1.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Axel Lin
Make the modalias match driver name, this is required to make module auto-loading work.
Signed-off-by Axel Lin <[email protected]>
Thanks Axel
Could you also share the info what's the condition of auto-loading module.
What I am test here is change the names works.
- .name = "hix5hd2-i2c", + .name = "i2c-hix5hd2",
Change MODULE_ALIAS("platform:hix5hd2-i2c") does not works here. Do I make some mistake?
Quoted 15 lines
--- drivers/i2c/busses/i2c-hix5hd2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-hix5hd2.c +1
-1@@ -554,4 +554,4 @@ module_platform_driver(hix5hd2_i2c_driver);MODULE_DESCRIPTION ("Hix5hd2 I2C Bus driver" );MODULE_AUTHOR ("Wei Yan <[email protected]>" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:i2c-hix5hd2" ); +MODULE_ALIAS ("platform:hix5hd2-i2c" );
A message that is not in the archive (sent off-list or not yet received): [email protected]
2015-05-08 22:56 GMT+08:00 zhangfei <[email protected]>:
Quoted 18 lines · Axel Lin
Quoted 5 lines
Make the modalias match driver name, this is required to make module auto-loading work.
Signed-off-by Axel Lin <[email protected]>Thanks Axel
Could you also share the info what's the condition of auto-loading module.
What I am test here is change the names works.
(quoted diff) +1
-1- .name = "hix5hd2-i2c", + .name = "i2c-hix5hd2",
Quoted 2 lines
Change
MODULE_ALIAS("platform:hix5hd2-i2c")does not works here. Do I make some mistake?
The driver name needs to match the platform device name. I have no idea why you change the driver name and it still work.
In drivers/base/platform.c, the platform_uevent sends uevenet with MODALIAS=platform:pdev->name. so the MODULE_ALIAS needs to match pdev->name. Maybe forgot running depmod -a?
Zhangfei Gao
Acked-byQuoted 4 lines · Axel Lin
Make the modalias match driver name, this is required to make module auto-loading work.
Signed-off-by Axel Lin <[email protected]>
Thanks for the patch,
Also checked MODULE_ALIAS notes in Documentation/i2c/writing-clients.
Quoted 19 lines
--- drivers/i2c/busses/i2c-hix5hd2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-hix5hd2.c +1
-2@@ -554,4 +554,4 @@ module_platform_driver(hix5hd2_i2c_driver);MODULE_DESCRIPTION ("Hix5hd2 I2C Bus driver" );MODULE_AUTHOR ("Wei Yan <[email protected]>" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:i2c-hix5hd2" ); +MODULE_ALIAS ("platform:hix5hd2-i2c" ); --2.1.0
Wolfram Sang
AppliedQuoted 4 lines · Axel Lin
Make the modalias match driver name, this is required to make module auto-loading work.
Signed-off-by Axel Lin <[email protected]>
Applied to for-current, thanks!
Added stable, too.