* [PATCH] i2c: hix5hd2: Fix modalias to make module auto-loading work
@ 2015-05-08 0:50 Axel Lin
[not found] ` <1431046211.31122.1.camel-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Axel Lin @ 2015-05-08 0:50 UTC (permalink / raw)
To: Wolfram Sang; +Cc: Wei Yan, Zhangfei Gao, linux-i2c-u79uwXL29TY76Z2rM5mHXA
Make the modalias match driver name, this is required to make module
auto-loading work.
Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
drivers/i2c/busses/i2c-hix5hd2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-hix5hd2.c b/drivers/i2c/busses/i2c-hix5hd2.c
index 8fe78d0..7c696643 100644
--- a/drivers/i2c/busses/i2c-hix5hd2.c
+++ b/drivers/i2c/busses/i2c-hix5hd2.c
@@ -554,4 +554,4 @@ module_platform_driver(hix5hd2_i2c_driver);
MODULE_DESCRIPTION("Hix5hd2 I2C Bus driver");
MODULE_AUTHOR("Wei Yan <sledge.yanwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>");
MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:i2c-hix5hd2");
+MODULE_ALIAS("platform:hix5hd2-i2c");
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: hix5hd2: Fix modalias to make module auto-loading work
[not found] ` <1431046211.31122.1.camel-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
@ 2015-05-08 14:56 ` zhangfei
[not found] ` <554CCEBB.6000107-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-05-11 4:09 ` Zhangfei Gao
2015-05-12 16:10 ` Wolfram Sang
2 siblings, 1 reply; 5+ messages in thread
From: zhangfei @ 2015-05-08 14:56 UTC (permalink / raw)
To: Axel Lin, Wolfram Sang; +Cc: Wei Yan, linux-i2c-u79uwXL29TY76Z2rM5mHXA
On 05/08/2015 08:50 AM, Axel Lin wrote:
> Make the modalias match driver name, this is required to make module
> auto-loading work.
>
> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
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?
> ---
> drivers/i2c/busses/i2c-hix5hd2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-hix5hd2.c b/drivers/i2c/busses/i2c-hix5hd2.c
> index 8fe78d0..7c696643 100644
> --- a/drivers/i2c/busses/i2c-hix5hd2.c
> +++ b/drivers/i2c/busses/i2c-hix5hd2.c
> @@ -554,4 +554,4 @@ module_platform_driver(hix5hd2_i2c_driver);
> MODULE_DESCRIPTION("Hix5hd2 I2C Bus driver");
> MODULE_AUTHOR("Wei Yan <sledge.yanwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>");
> MODULE_LICENSE("GPL");
> -MODULE_ALIAS("platform:i2c-hix5hd2");
> +MODULE_ALIAS("platform:hix5hd2-i2c");
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: hix5hd2: Fix modalias to make module auto-loading work
[not found] ` <554CCEBB.6000107-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2015-05-08 15:21 ` Axel Lin
0 siblings, 0 replies; 5+ messages in thread
From: Axel Lin @ 2015-05-08 15:21 UTC (permalink / raw)
To: zhangfei; +Cc: Wolfram Sang, Wei Yan, linux-i2c-u79uwXL29TY76Z2rM5mHXA
2015-05-08 22:56 GMT+08:00 zhangfei <zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>:
>
>
> On 05/08/2015 08:50 AM, Axel Lin wrote:
>>
>> Make the modalias match driver name, this is required to make module
>> auto-loading work.
>>
>> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
>
>
> 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?
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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: hix5hd2: Fix modalias to make module auto-loading work
[not found] ` <1431046211.31122.1.camel-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
2015-05-08 14:56 ` zhangfei
@ 2015-05-11 4:09 ` Zhangfei Gao
2015-05-12 16:10 ` Wolfram Sang
2 siblings, 0 replies; 5+ messages in thread
From: Zhangfei Gao @ 2015-05-11 4:09 UTC (permalink / raw)
To: Axel Lin
Cc: Wolfram Sang, Wei Yan,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On 8 May 2015 at 08:50, Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org> wrote:
> Make the modalias match driver name, this is required to make module
> auto-loading work.
>
> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
Acked-by: Zhangfei Gao <zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Thanks for the patch,
Also checked MODULE_ALIAS notes in Documentation/i2c/writing-clients.
> ---
> drivers/i2c/busses/i2c-hix5hd2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-hix5hd2.c b/drivers/i2c/busses/i2c-hix5hd2.c
> index 8fe78d0..7c696643 100644
> --- a/drivers/i2c/busses/i2c-hix5hd2.c
> +++ b/drivers/i2c/busses/i2c-hix5hd2.c
> @@ -554,4 +554,4 @@ module_platform_driver(hix5hd2_i2c_driver);
> MODULE_DESCRIPTION("Hix5hd2 I2C Bus driver");
> MODULE_AUTHOR("Wei Yan <sledge.yanwei-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>");
> MODULE_LICENSE("GPL");
> -MODULE_ALIAS("platform:i2c-hix5hd2");
> +MODULE_ALIAS("platform:hix5hd2-i2c");
> --
> 2.1.0
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: hix5hd2: Fix modalias to make module auto-loading work
[not found] ` <1431046211.31122.1.camel-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
2015-05-08 14:56 ` zhangfei
2015-05-11 4:09 ` Zhangfei Gao
@ 2015-05-12 16:10 ` Wolfram Sang
2 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2015-05-12 16:10 UTC (permalink / raw)
To: Axel Lin; +Cc: Wei Yan, Zhangfei Gao, linux-i2c-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 292 bytes --]
On Fri, May 08, 2015 at 08:50:11AM +0800, Axel Lin wrote:
> Make the modalias match driver name, this is required to make module
> auto-loading work.
>
> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
Applied to for-current, thanks!
Added stable, too.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-12 16:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-08 0:50 [PATCH] i2c: hix5hd2: Fix modalias to make module auto-loading work Axel Lin
[not found] ` <1431046211.31122.1.camel-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
2015-05-08 14:56 ` zhangfei
[not found] ` <554CCEBB.6000107-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-05-08 15:21 ` Axel Lin
2015-05-11 4:09 ` Zhangfei Gao
2015-05-12 16:10 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).