MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata
Subsystems (2)
Rafał Miłecki
maintainerPATCH 1/1 MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata
From: Rafał Miłecki <[email protected]>
This struct variable is used during init only. It gets passed to the gpio_led_register_device() which creates its own data copy. That allows using __initdata and saving some minimal amount of memory.
--- arch/mips/bcm47xx/leds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/bcm47xx/leds.c +1 -1
@@ -521,7 +521,7 @@ bcm47xx_leds_simpletech_simpleshare[] __initconst = {* Init **************************************************/ -static struct gpio_led_platform_data bcm47xx_leds_pdata; +static struct gpio_led_platform_data bcm47xx_leds_pdata__initdata ;#define bcm47xx_set_pdata (dev_leds) do { \ bcm47xx_leds_pdata.leds = dev_leds; \
Signature · 1 line
2.11.0
Hi,
Quoted 7 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
This struct variable is used during init only. It gets passed to the
gpio_led_register_device()which creates its own data copy. That allows using__initdataand saving some minimal amount of memory.Signed-off-by Rafał Miłecki <[email protected]>
A.
Quoted 21 lines
--- arch/mips/bcm47xx/leds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/mips/bcm47xx/leds.c +1
-1@@ -521,7 +521,7 @@ bcm47xx_leds_simpletech_simpleshare[] __initconst = {* Init **************************************************/ -static struct gpio_led_platform_data bcm47xx_leds_pdata; +static struct gpio_led_platform_data bcm47xx_leds_pdata__initdata ;#define bcm47xx_set_pdata (dev_leds) do { \ bcm47xx_leds_pdata.leds = dev_leds; \Signature · 1 line
2.11.0
Rafał Miłecki
maintainerQuoted 7 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
This struct variable is used during init only. It gets passed to the
gpio_led_register_device()which creates its own data copy. That allows using__initdataand saving some minimal amount of memory.Signed-off-by Rafał Miłecki <[email protected]>
James, would you care to take this trivial patch?
Quoted 10 lines · Rafał Miłecki
Quoted 7 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
This struct variable is used during init only. It gets passed to the
gpio_led_register_device()which creates its own data copy. That allows using__initdataand saving some minimal amount of memory.Signed-off-by Rafał Miłecki <[email protected]>James, would you care to take this trivial patch?
Yes, applied for 4.18
Thanks
James