Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata
@ 2018-03-23 22:58 Rafał Miłecki
  2018-03-24  0:52 ` Aaro Koskinen
  2018-04-23  4:51 ` Rafał Miłecki
  0 siblings, 2 replies; 4+ messages in thread
From: Rafał Miłecki @ 2018-03-23 22:58 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle
  Cc: Hauke Mehrtens, James Hogan, Dan Haab, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

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.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 arch/mips/bcm47xx/leds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
index 8307a8a02667..fb87a6c54bc9 100644
--- a/arch/mips/bcm47xx/leds.c
+++ b/arch/mips/bcm47xx/leds.c
@@ -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;				\
-- 
2.11.0

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

end of thread, other threads:[~2018-04-24 10:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-23 22:58 [PATCH] MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata Rafał Miłecki
2018-03-24  0:52 ` Aaro Koskinen
2018-04-23  4:51 ` Rafał Miłecki
2018-04-24 10:47   ` James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox