Message ID | adb77ba31b66d391a49a12434dfe7811e8a8ba0f.1514267721.git.arvind.yadav.cs@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Dec 26, 2017 at 7:37 AM, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote: > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Please write one-sentence long, easy to understand message describing the change. Best regards, Krzysztof > --- > changes in v2: > The GPIO LED driver can be built as a module, it can > be loaded after the init sections have gone away. > So removed '__initconst'. > > arch/arm/mach-s3c24xx/mach-h1940.c | 2 +- > arch/arm/mach-s3c24xx/mach-rx1950.c | 2 +- > arch/arm/mach-s3c64xx/mach-hmt.c | 2 +- > arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +- > arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +- > arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +- > 6 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c > index 7ed7861..6a3e0e6 100644 > --- a/arch/arm/mach-s3c24xx/mach-h1940.c > +++ b/arch/arm/mach-s3c24xx/mach-h1940.c > @@ -413,7 +413,7 @@ int h1940_led_blink_set(struct gpio_desc *desc, int state, > } > EXPORT_SYMBOL(h1940_led_blink_set); > > -static struct gpio_led h1940_leds_desc[] = { > +static const struct gpio_led h1940_leds_desc[] = { > { > .name = "Green", > .default_trigger = "main-battery-full", > diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c > index e86ad6a..97bb6a5 100644 > --- a/arch/arm/mach-s3c24xx/mach-rx1950.c > +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c > @@ -295,7 +295,7 @@ static int rx1950_led_blink_set(struct gpio_desc *desc, int state, > return 0; > } > > -static struct gpio_led rx1950_leds_desc[] = { > +static const struct gpio_led rx1950_leds_desc[] = { > { > .name = "Green", > .default_trigger = "main-battery-full", > diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c > index 59b5531..f8d644f 100644 > --- a/arch/arm/mach-s3c64xx/mach-hmt.c > +++ b/arch/arm/mach-s3c64xx/mach-hmt.c > @@ -207,7 +207,7 @@ static struct s3c2410_platform_nand hmt_nand_info = { > .ecc_mode = NAND_ECC_SOFT, > }; > > -static struct gpio_led hmt_leds[] = { > +static const struct gpio_led hmt_leds[] = { > { /* left function keys */ > .name = "left:blue", > .gpio = S3C64XX_GPO(12), > diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c > index 0972b6c..5a7cd8f 100644 > --- a/arch/arm/mach-s3c64xx/mach-smartq5.c > +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c > @@ -35,7 +35,7 @@ > #include "common.h" > #include "mach-smartq.h" > > -static struct gpio_led smartq5_leds[] = { > +static const struct gpio_led smartq5_leds[] = { > { > .name = "smartq5:green", > .active_low = 1, > diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c > index 51ac1c6..9de9fc2 100644 > --- a/arch/arm/mach-s3c64xx/mach-smartq7.c > +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c > @@ -35,7 +35,7 @@ > #include "common.h" > #include "mach-smartq.h" > > -static struct gpio_led smartq7_leds[] = { > +static const struct gpio_led smartq7_leds[] = { > { > .name = "smartq7:red", > .active_low = 1, > diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c > index 92ec8c3..be9d98f 100644 > --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c > +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c > @@ -497,7 +497,7 @@ static struct wm8350_platform_data __initdata smdk6410_wm8350_pdata = { > #endif > > #ifdef CONFIG_SMDK6410_WM1192_EV1 > -static struct gpio_led wm1192_pmic_leds[] = { > +static const struct gpio_led wm1192_pmic_leds[] = { > { > .name = "PMIC:red:power", > .gpio = GPIO_BOARD_START + 3, > -- > 2.7.4 >
Hi, On Tuesday 26 December 2017 11:12 PM, Krzysztof Kozlowski wrote: > On Tue, Dec 26, 2017 at 7:37 AM, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote: >> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> > Please write one-sentence long, easy to understand message describing > the change. > > Best regards, > Krzysztof Thanks for review comment. I will add. > >> --- >> changes in v2: >> The GPIO LED driver can be built as a module, it can >> be loaded after the init sections have gone away. >> So removed '__initconst'. >> >> arch/arm/mach-s3c24xx/mach-h1940.c | 2 +- >> arch/arm/mach-s3c24xx/mach-rx1950.c | 2 +- >> arch/arm/mach-s3c64xx/mach-hmt.c | 2 +- >> arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +- >> arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +- >> arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +- >> 6 files changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c >> index 7ed7861..6a3e0e6 100644 >> --- a/arch/arm/mach-s3c24xx/mach-h1940.c >> +++ b/arch/arm/mach-s3c24xx/mach-h1940.c >> @@ -413,7 +413,7 @@ int h1940_led_blink_set(struct gpio_desc *desc, int state, >> } >> EXPORT_SYMBOL(h1940_led_blink_set); >> >> -static struct gpio_led h1940_leds_desc[] = { >> +static const struct gpio_led h1940_leds_desc[] = { >> { >> .name = "Green", >> .default_trigger = "main-battery-full", >> diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c >> index e86ad6a..97bb6a5 100644 >> --- a/arch/arm/mach-s3c24xx/mach-rx1950.c >> +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c >> @@ -295,7 +295,7 @@ static int rx1950_led_blink_set(struct gpio_desc *desc, int state, >> return 0; >> } >> >> -static struct gpio_led rx1950_leds_desc[] = { >> +static const struct gpio_led rx1950_leds_desc[] = { >> { >> .name = "Green", >> .default_trigger = "main-battery-full", >> diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c >> index 59b5531..f8d644f 100644 >> --- a/arch/arm/mach-s3c64xx/mach-hmt.c >> +++ b/arch/arm/mach-s3c64xx/mach-hmt.c >> @@ -207,7 +207,7 @@ static struct s3c2410_platform_nand hmt_nand_info = { >> .ecc_mode = NAND_ECC_SOFT, >> }; >> >> -static struct gpio_led hmt_leds[] = { >> +static const struct gpio_led hmt_leds[] = { >> { /* left function keys */ >> .name = "left:blue", >> .gpio = S3C64XX_GPO(12), >> diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c >> index 0972b6c..5a7cd8f 100644 >> --- a/arch/arm/mach-s3c64xx/mach-smartq5.c >> +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c >> @@ -35,7 +35,7 @@ >> #include "common.h" >> #include "mach-smartq.h" >> >> -static struct gpio_led smartq5_leds[] = { >> +static const struct gpio_led smartq5_leds[] = { >> { >> .name = "smartq5:green", >> .active_low = 1, >> diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c >> index 51ac1c6..9de9fc2 100644 >> --- a/arch/arm/mach-s3c64xx/mach-smartq7.c >> +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c >> @@ -35,7 +35,7 @@ >> #include "common.h" >> #include "mach-smartq.h" >> >> -static struct gpio_led smartq7_leds[] = { >> +static const struct gpio_led smartq7_leds[] = { >> { >> .name = "smartq7:red", >> .active_low = 1, >> diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c >> index 92ec8c3..be9d98f 100644 >> --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c >> +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c >> @@ -497,7 +497,7 @@ static struct wm8350_platform_data __initdata smdk6410_wm8350_pdata = { >> #endif >> >> #ifdef CONFIG_SMDK6410_WM1192_EV1 >> -static struct gpio_led wm1192_pmic_leds[] = { >> +static const struct gpio_led wm1192_pmic_leds[] = { >> { >> .name = "PMIC:red:power", >> .gpio = GPIO_BOARD_START + 3, >> -- >> 2.7.4 >>
On Tue, Dec 26, 2017 at 7:50 PM, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote: > gpio_led are not supposed to change at runtime. > struct gpio_led_platform_data working with const gpio_led > provided by <linux/leds.h>. So mark the non-const structs > as const. > > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> > --- > changes in v2: > The GPIO LED driver can be built as a module, it can > be loaded after the init sections have gone away. > So removed '__initconst'. > changes in v3: > Description was missing. > > arch/arm/mach-s3c24xx/mach-h1940.c | 2 +- > arch/arm/mach-s3c24xx/mach-rx1950.c | 2 +- > arch/arm/mach-s3c64xx/mach-hmt.c | 2 +- > arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +- > arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +- > arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +- > 6 files changed, 6 insertions(+), 6 deletions(-) There were few build errors reported by kbuild for your patches. Are you sure that you compiled every file you touch? Best regards, Krzysztof
Hi, On Wednesday 27 December 2017 01:49 PM, Krzysztof Kozlowski wrote: > On Tue, Dec 26, 2017 at 7:50 PM, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote: >> gpio_led are not supposed to change at runtime. >> struct gpio_led_platform_data working with const gpio_led >> provided by <linux/leds.h>. So mark the non-const structs >> as const. >> >> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> >> --- >> changes in v2: >> The GPIO LED driver can be built as a module, it can >> be loaded after the init sections have gone away. >> So removed '__initconst'. >> changes in v3: >> Description was missing. >> >> arch/arm/mach-s3c24xx/mach-h1940.c | 2 +- >> arch/arm/mach-s3c24xx/mach-rx1950.c | 2 +- >> arch/arm/mach-s3c64xx/mach-hmt.c | 2 +- >> arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +- >> arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +- >> arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +- >> 6 files changed, 6 insertions(+), 6 deletions(-) > There were few build errors reported by kbuild for your patches. Are > you sure that you compiled every file you touch? > > Best regards, > Krzysztof Yes, I got few build error which I have fixed it. and send updated patch. Now I have done cross checking. It's not having any build failure. Regards arvind
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c index 7ed7861..6a3e0e6 100644 --- a/arch/arm/mach-s3c24xx/mach-h1940.c +++ b/arch/arm/mach-s3c24xx/mach-h1940.c @@ -413,7 +413,7 @@ int h1940_led_blink_set(struct gpio_desc *desc, int state, } EXPORT_SYMBOL(h1940_led_blink_set); -static struct gpio_led h1940_leds_desc[] = { +static const struct gpio_led h1940_leds_desc[] = { { .name = "Green", .default_trigger = "main-battery-full", diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c index e86ad6a..97bb6a5 100644 --- a/arch/arm/mach-s3c24xx/mach-rx1950.c +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c @@ -295,7 +295,7 @@ static int rx1950_led_blink_set(struct gpio_desc *desc, int state, return 0; } -static struct gpio_led rx1950_leds_desc[] = { +static const struct gpio_led rx1950_leds_desc[] = { { .name = "Green", .default_trigger = "main-battery-full", diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index 59b5531..f8d644f 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c @@ -207,7 +207,7 @@ static struct s3c2410_platform_nand hmt_nand_info = { .ecc_mode = NAND_ECC_SOFT, }; -static struct gpio_led hmt_leds[] = { +static const struct gpio_led hmt_leds[] = { { /* left function keys */ .name = "left:blue", .gpio = S3C64XX_GPO(12), diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c index 0972b6c..5a7cd8f 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq5.c +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c @@ -35,7 +35,7 @@ #include "common.h" #include "mach-smartq.h" -static struct gpio_led smartq5_leds[] = { +static const struct gpio_led smartq5_leds[] = { { .name = "smartq5:green", .active_low = 1, diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c index 51ac1c6..9de9fc2 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq7.c +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c @@ -35,7 +35,7 @@ #include "common.h" #include "mach-smartq.h" -static struct gpio_led smartq7_leds[] = { +static const struct gpio_led smartq7_leds[] = { { .name = "smartq7:red", .active_low = 1, diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index 92ec8c3..be9d98f 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c @@ -497,7 +497,7 @@ static struct wm8350_platform_data __initdata smdk6410_wm8350_pdata = { #endif #ifdef CONFIG_SMDK6410_WM1192_EV1 -static struct gpio_led wm1192_pmic_leds[] = { +static const struct gpio_led wm1192_pmic_leds[] = { { .name = "PMIC:red:power", .gpio = GPIO_BOARD_START + 3,
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- changes in v2: The GPIO LED driver can be built as a module, it can be loaded after the init sections have gone away. So removed '__initconst'. arch/arm/mach-s3c24xx/mach-h1940.c | 2 +- arch/arm/mach-s3c24xx/mach-rx1950.c | 2 +- arch/arm/mach-s3c64xx/mach-hmt.c | 2 +- arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +- arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +- arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)