MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata
authorRafał Miłecki <rafal@milecki.pl>
Fri, 23 Mar 2018 22:58:07 +0000 (23:58 +0100)
committerJames Hogan <jhogan@kernel.org>
Mon, 23 Apr 2018 15:44:38 +0000 (16:44 +0100)
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>
Reviewed-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/18928/
Signed-off-by: James Hogan <jhogan@kernel.org>
arch/mips/bcm47xx/leds.c

index 3fe015602945c85b0233ec2c567373e0fdbf95c9..d85fcdac8bf0817779775bcde04209366c742cdd 100644 (file)
@@ -538,7 +538,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;                             \