Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1501039 > unrolled thread

[PATCH 0/3] thermal: Fix module autoload for drivers

Started byJavier Martinez Canillas <javier@osg.samsung.com>
First post2016-10-14 16:40 +0200
Last post2016-10-14 17:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/3] thermal: Fix module autoload for drivers Javier Martinez Canillas <javier@osg.samsung.com> - 2016-10-14 16:40 +0200
    [PATCH 2/3] thermal: tango: Fix module autoload Javier Martinez Canillas <javier@osg.samsung.com> - 2016-10-14 16:40 +0200
      Re: [PATCH 2/3] thermal: tango: Fix module autoload Marc Gonzalez <marc_gonzalez@sigmadesigns.com> - 2016-10-14 17:40 +0200

#1501039 — [PATCH 0/3] thermal: Fix module autoload for drivers

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-10-14 16:40 +0200
Subject[PATCH 0/3] thermal: Fix module autoload for drivers
Message-ID<ssbOp-2ti-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1501040 — [PATCH 2/3] thermal: tango: Fix module autoload

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-10-14 16:40 +0200
Subject[PATCH 2/3] thermal: tango: Fix module autoload
Message-ID<ssbOq-2ti-7@gated-at.bofh.it>
In reply to#1501039
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

[toc] | [prev] | [next] | [standalone]


#1501063 — Re: [PATCH 2/3] thermal: tango: Fix module autoload

FromMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
Date2016-10-14 17:40 +0200
SubjectRe: [PATCH 2/3] thermal: tango: Fix module autoload
Message-ID<sscKu-36Y-9@gated-at.bofh.it>
In reply to#1501040
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.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web