2015-05-13 15:18:30

by Javier Martinez Canillas

[permalink] [raw]
Subject: [PATCH 0/2] rtc: Fix module autoload for max77xx RTC drivers

Hello Alexandre and Alessandro,

This is a trivial series that fixes module autoloading for the Maxim
MAX77686 and MAX77802 RTC drivers that didn't export their platform
device ID table with MODULE_DEVICE_TABLE() so modalias information
was not available.

The series is composed of the following patches:

Javier Martinez Canillas (2):
rtc: max77686: Report platform modalias to fix module autoload
rtc: max77802: Report platform modalias to fix module autoload

drivers/rtc/rtc-max77686.c | 1 +
drivers/rtc/rtc-max77802.c | 1 +
2 files changed, 2 insertions(+)

Best regards,
Javier


2015-05-13 15:18:58

by Javier Martinez Canillas

[permalink] [raw]
Subject: [PATCH 1/2] rtc: max77686: Report platform modalias to fix module autoload

If the rtc-max77686 driver is built as a module, modalias information is
not filled so the module is not autoloaded. Use the MODULE_DEVICE_TABLE()
macro to export the platform ID table so the module contains that data.

Signed-off-by: Javier Martinez Canillas <[email protected]>
---
drivers/rtc/rtc-max77686.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 7632a87784c3..7184a0eda793 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -511,6 +511,7 @@ static const struct platform_device_id rtc_id[] = {
{ "max77686-rtc", 0 },
{},
};
+MODULE_DEVICE_TABLE(platform, rtc_id);

static struct platform_driver max77686_rtc_driver = {
.driver = {
--
2.1.4

2015-05-13 15:18:39

by Javier Martinez Canillas

[permalink] [raw]
Subject: [PATCH 2/2] rtc: max77802: Report platform modalias to fix module autoload

If the rtc-max77802 driver is built as a module, modalias information is
not filled so the module is not autoloaded. Use the MODULE_DEVICE_TABLE()
macro to export the platform ID table so the module contains that data.

Signed-off-by: Javier Martinez Canillas <[email protected]>
---
drivers/rtc/rtc-max77802.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/rtc/rtc-max77802.c b/drivers/rtc/rtc-max77802.c
index 7f8adf8d6feb..82ffcc5a5345 100644
--- a/drivers/rtc/rtc-max77802.c
+++ b/drivers/rtc/rtc-max77802.c
@@ -484,6 +484,7 @@ static const struct platform_device_id rtc_id[] = {
{ "max77802-rtc", 0 },
{},
};
+MODULE_DEVICE_TABLE(platform, rtc_id);

static struct platform_driver max77802_rtc_driver = {
.driver = {
--
2.1.4

2015-05-13 23:47:19

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 0/2] rtc: Fix module autoload for max77xx RTC drivers

On 14.05.2015 00:18, Javier Martinez Canillas wrote:
> Hello Alexandre and Alessandro,
>
> This is a trivial series that fixes module autoloading for the Maxim
> MAX77686 and MAX77802 RTC drivers that didn't export their platform
> device ID table with MODULE_DEVICE_TABLE() so modalias information
> was not available.
>
> The series is composed of the following patches:
>
> Javier Martinez Canillas (2):
> rtc: max77686: Report platform modalias to fix module autoload
> rtc: max77802: Report platform modalias to fix module autoload
>
> drivers/rtc/rtc-max77686.c | 1 +
> drivers/rtc/rtc-max77802.c | 1 +
> 2 files changed, 2 insertions(+)

For the patchset:
Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2015-05-18 22:45:39

by Alexandre Belloni

[permalink] [raw]
Subject: Re: [PATCH 0/2] rtc: Fix module autoload for max77xx RTC drivers

On 13/05/2015 at 17:18:00 +0200, Javier Martinez Canillas wrote :
> Hello Alexandre and Alessandro,
>
> This is a trivial series that fixes module autoloading for the Maxim
> MAX77686 and MAX77802 RTC drivers that didn't export their platform
> device ID table with MODULE_DEVICE_TABLE() so modalias information
> was not available.
>
> The series is composed of the following patches:
>
> Javier Martinez Canillas (2):
> rtc: max77686: Report platform modalias to fix module autoload
> rtc: max77802: Report platform modalias to fix module autoload
>

Both applied, thanks.

> drivers/rtc/rtc-max77686.c | 1 +
> drivers/rtc/rtc-max77802.c | 1 +
> 2 files changed, 2 insertions(+)
>
> Best regards,
> Javier
>

--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com