linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] thermal: Fix module autoload for drivers
@ 2016-10-14 14:34 Javier Martinez Canillas
  2016-10-14 14:35 ` [PATCH 1/3] thermal: max77620: Fix module autoload Javier Martinez Canillas
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Javier Martinez Canillas @ 2016-10-14 14:34 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Marc Gonzalez, linux-pm,
	Eduardo Valentin, Zhang Rui, linux-arm-kernel

Hello,

This small series contains trivial fixes to allow modules to be autoloaded
when its correspoinding thermal device is registered.

Best regards,
Javier


Javier Martinez Canillas (3):
  thermal: max77620: Fix module autoload
  thermal: tango: Fix module autoload
  thermal: db8500: Fix module autoload

 drivers/thermal/db8500_thermal.c   | 1 +
 drivers/thermal/max77620_thermal.c | 1 +
 drivers/thermal/tango_thermal.c    | 1 +
 3 files changed, 3 insertions(+)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] thermal: max77620: Fix module autoload
  2016-10-14 14:34 [PATCH 0/3] thermal: Fix module autoload for drivers Javier Martinez Canillas
@ 2016-10-14 14:35 ` Javier Martinez Canillas
  2016-10-14 14:35 ` [PATCH 2/3] thermal: tango: " Javier Martinez Canillas
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Javier Martinez Canillas @ 2016-10-14 14:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Zhang Rui, Eduardo Valentin, linux-pm

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/thermal/max77620_thermal.ko | grep alias
$

After this patch:

$ modinfo drivers/thermal/max77620_thermal.ko | grep alias
alias:          platform:max77620-thermal

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/thermal/max77620_thermal.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/max77620_thermal.c b/drivers/thermal/max77620_thermal.c
index 83905ff46e40..e9a1fe342760 100644
--- a/drivers/thermal/max77620_thermal.c
+++ b/drivers/thermal/max77620_thermal.c
@@ -149,6 +149,7 @@ static struct platform_device_id max77620_thermal_devtype[] = {
 	{ .name = "max77620-thermal", },
 	{},
 };
+MODULE_DEVICE_TABLE(platform, max77620_thermal_devtype);
 
 static struct platform_driver max77620_thermal_driver = {
 	.driver = {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] thermal: tango: Fix module autoload
  2016-10-14 14:34 [PATCH 0/3] thermal: Fix module autoload for drivers Javier Martinez Canillas
  2016-10-14 14:35 ` [PATCH 1/3] thermal: max77620: Fix module autoload Javier Martinez Canillas
@ 2016-10-14 14:35 ` Javier Martinez Canillas
  2016-10-14 15:27   ` Marc Gonzalez
  2016-10-14 14:35 ` [PATCH 3/3] thermal: db8500: " Javier Martinez Canillas
  2016-11-17 11:50 ` [PATCH 0/3] thermal: Fix module autoload for drivers Javier Martinez Canillas
  3 siblings, 1 reply; 8+ messages in thread
From: Javier Martinez Canillas @ 2016-10-14 14:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Marc Gonzalez, linux-pm,
	Eduardo Valentin, Zhang Rui, linux-arm-kernel

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/thermal/tango_thermal.ko | grep alias
$

After this patch:

$ modinfo drivers/thermal/tango_thermal.ko | grep alias
alias:          of:N*T*Csigma,smp8758-thermalC*
alias:          of:N*T*Csigma,smp8758-thermal

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/thermal/tango_thermal.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/tango_thermal.c b/drivers/thermal/tango_thermal.c
index 201304aeafeb..4e67795cb6ce 100644
--- a/drivers/thermal/tango_thermal.c
+++ b/drivers/thermal/tango_thermal.c
@@ -107,6 +107,7 @@ static const struct of_device_id tango_sensor_ids[] = {
 	},
 	{ /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, tango_sensor_ids);
 
 static struct platform_driver tango_thermal_driver = {
 	.probe	= tango_thermal_probe,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] thermal: db8500: Fix module autoload
  2016-10-14 14:34 [PATCH 0/3] thermal: Fix module autoload for drivers Javier Martinez Canillas
  2016-10-14 14:35 ` [PATCH 1/3] thermal: max77620: Fix module autoload Javier Martinez Canillas
  2016-10-14 14:35 ` [PATCH 2/3] thermal: tango: " Javier Martinez Canillas
@ 2016-10-14 14:35 ` Javier Martinez Canillas
  2016-11-17 11:50 ` [PATCH 0/3] thermal: Fix module autoload for drivers Javier Martinez Canillas
  3 siblings, 0 replies; 8+ messages in thread
From: Javier Martinez Canillas @ 2016-10-14 14:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Zhang Rui, Eduardo Valentin, linux-pm

If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/thermal/db8500_thermal.ko | grep alias
$

After this patch:

$ modinfo drivers/thermal/db8500_thermal.ko | grep alias
alias:          of:N*T*Cstericsson,db8500-thermalC*
alias:          of:N*T*Cstericsson,db8500-thermal

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/thermal/db8500_thermal.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/db8500_thermal.c b/drivers/thermal/db8500_thermal.c
index e776cea80cfc..f491faf16592 100644
--- a/drivers/thermal/db8500_thermal.c
+++ b/drivers/thermal/db8500_thermal.c
@@ -512,6 +512,7 @@ static const struct of_device_id db8500_thermal_match[] = {
 	{ .compatible = "stericsson,db8500-thermal" },
 	{},
 };
+MODULE_DEVICE_TABLE(of, db8500_thermal_match);
 #endif
 
 static struct platform_driver db8500_thermal_driver = {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] thermal: tango: Fix module autoload
  2016-10-14 14:35 ` [PATCH 2/3] thermal: tango: " Javier Martinez Canillas
@ 2016-10-14 15:27   ` Marc Gonzalez
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Gonzalez @ 2016-10-14 15:27 UTC (permalink / raw)
  To: Javier Martinez Canillas, linux-kernel
  Cc: linux-pm, Eduardo Valentin, Zhang Rui, linux-arm-kernel

On 14/10/2016 16:35, Javier Martinez Canillas wrote:

> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
> 
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
> 
> Before this patch:
> 
> $ modinfo drivers/thermal/tango_thermal.ko | grep alias
> $
> 
> After this patch:
> 
> $ modinfo drivers/thermal/tango_thermal.ko | grep alias
> alias:          of:N*T*Csigma,smp8758-thermalC*
> alias:          of:N*T*Csigma,smp8758-thermal
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> ---
> 
>  drivers/thermal/tango_thermal.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/thermal/tango_thermal.c b/drivers/thermal/tango_thermal.c
> index 201304aeafeb..4e67795cb6ce 100644
> --- a/drivers/thermal/tango_thermal.c
> +++ b/drivers/thermal/tango_thermal.c
> @@ -107,6 +107,7 @@ static const struct of_device_id tango_sensor_ids[] = {
>  	},
>  	{ /* sentinel */ }
>  };
> +MODULE_DEVICE_TABLE(of, tango_sensor_ids);

Thanks for fixing it :-)

Acked-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>

Regards.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] thermal: Fix module autoload for drivers
  2016-10-14 14:34 [PATCH 0/3] thermal: Fix module autoload for drivers Javier Martinez Canillas
                   ` (2 preceding siblings ...)
  2016-10-14 14:35 ` [PATCH 3/3] thermal: db8500: " Javier Martinez Canillas
@ 2016-11-17 11:50 ` Javier Martinez Canillas
  2016-11-17 14:53   ` Eduardo Valentin
  3 siblings, 1 reply; 8+ messages in thread
From: Javier Martinez Canillas @ 2016-11-17 11:50 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Linux Kernel, Marc Gonzalez, linux-pm, Eduardo Valentin,
	Zhang Rui, linux-arm-kernel

Hello Eduardo,

On Fri, Oct 14, 2016 at 11:34 AM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello,
>
> This small series contains trivial fixes to allow modules to be autoloaded
> when its correspoinding thermal device is registered.
>
> Best regards,
> Javier
>
>
> Javier Martinez Canillas (3):
>   thermal: max77620: Fix module autoload
>   thermal: tango: Fix module autoload
>   thermal: db8500: Fix module autoload
>

Any comments about these patches?

Best regards,
Javier

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] thermal: Fix module autoload for drivers
  2016-11-17 11:50 ` [PATCH 0/3] thermal: Fix module autoload for drivers Javier Martinez Canillas
@ 2016-11-17 14:53   ` Eduardo Valentin
  2016-11-17 14:58     ` Javier Martinez Canillas
  0 siblings, 1 reply; 8+ messages in thread
From: Eduardo Valentin @ 2016-11-17 14:53 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Javier Martinez Canillas, Linux Kernel, Marc Gonzalez, linux-pm,
	Zhang Rui, linux-arm-kernel

On Thu, Nov 17, 2016 at 08:50:11AM -0300, Javier Martinez Canillas wrote:
> Hello Eduardo,
> 
> On Fri, Oct 14, 2016 at 11:34 AM, Javier Martinez Canillas
> <javier@osg.samsung.com> wrote:
> > Hello,
> >
> > This small series contains trivial fixes to allow modules to be autoloaded
> > when its correspoinding thermal device is registered.
> >
> > Best regards,
> > Javier
> >
> >
> > Javier Martinez Canillas (3):
> >   thermal: max77620: Fix module autoload
> >   thermal: tango: Fix module autoload
> >   thermal: db8500: Fix module autoload
> >
> 
> Any comments about these patches?

So far no. I am finalizing a couple of automated testing, but they are
in my queue.

Thanks for the fixes.

BR,

> 
> Best regards,
> Javier

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] thermal: Fix module autoload for drivers
  2016-11-17 14:53   ` Eduardo Valentin
@ 2016-11-17 14:58     ` Javier Martinez Canillas
  0 siblings, 0 replies; 8+ messages in thread
From: Javier Martinez Canillas @ 2016-11-17 14:58 UTC (permalink / raw)
  To: Eduardo Valentin, Javier Martinez Canillas
  Cc: Linux Kernel, Marc Gonzalez, linux-pm, Zhang Rui, linux-arm-kernel

Hello Eduardo,

On 11/17/2016 11:53 AM, Eduardo Valentin wrote:
> On Thu, Nov 17, 2016 at 08:50:11AM -0300, Javier Martinez Canillas wrote:
>> Hello Eduardo,
>>
>> On Fri, Oct 14, 2016 at 11:34 AM, Javier Martinez Canillas
>> <javier@osg.samsung.com> wrote:
>>> Hello,
>>>
>>> This small series contains trivial fixes to allow modules to be autoloaded
>>> when its correspoinding thermal device is registered.
>>>
>>> Best regards,
>>> Javier
>>>
>>>
>>> Javier Martinez Canillas (3):
>>>   thermal: max77620: Fix module autoload
>>>   thermal: tango: Fix module autoload
>>>   thermal: db8500: Fix module autoload
>>>
>>
>> Any comments about these patches?
> 
> So far no. I am finalizing a couple of automated testing, but they are
> in my queue.
>

Ok, I also got your automated emails about them being applied.
 
> Thanks for the fixes.
>

Thanks.
 
> BR,
> 
>>
>> Best regards,
>> Javier

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-11-17 18:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-14 14:34 [PATCH 0/3] thermal: Fix module autoload for drivers Javier Martinez Canillas
2016-10-14 14:35 ` [PATCH 1/3] thermal: max77620: Fix module autoload Javier Martinez Canillas
2016-10-14 14:35 ` [PATCH 2/3] thermal: tango: " Javier Martinez Canillas
2016-10-14 15:27   ` Marc Gonzalez
2016-10-14 14:35 ` [PATCH 3/3] thermal: db8500: " Javier Martinez Canillas
2016-11-17 11:50 ` [PATCH 0/3] thermal: Fix module autoload for drivers Javier Martinez Canillas
2016-11-17 14:53   ` Eduardo Valentin
2016-11-17 14:58     ` Javier Martinez Canillas

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).