Message ID | 1431046211.31122.1.camel@ingics.com |
---|---|
State | Accepted |
Headers | show |
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@ingics.com> 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@huawei.com>"); > MODULE_LICENSE("GPL"); > -MODULE_ALIAS("platform:i2c-hix5hd2"); > +MODULE_ALIAS("platform:hix5hd2-i2c"); > -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2015-05-08 22:56 GMT+08:00 zhangfei <zhangfei.gao@linaro.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@ingics.com> > > > 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? -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 8 May 2015 at 08:50, Axel Lin <axel.lin@ingics.com> wrote: > Make the modalias match driver name, this is required to make module > auto-loading work. > > Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Zhangfei Gao <zhangfei.gao@linaro.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@huawei.com>"); > MODULE_LICENSE("GPL"); > -MODULE_ALIAS("platform:i2c-hix5hd2"); > +MODULE_ALIAS("platform:hix5hd2-i2c"); > -- > 2.1.0 > > > -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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@ingics.com> Applied to for-current, thanks! Added stable, too.
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@huawei.com>"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:i2c-hix5hd2"); +MODULE_ALIAS("platform:hix5hd2-i2c");
Make the modalias match driver name, this is required to make module auto-loading work. Signed-off-by: Axel Lin <axel.lin@ingics.com> --- drivers/i2c/busses/i2c-hix5hd2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)