Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Cc: "Hauke Mehrtens" <hauke@hauke-m.de>,
	"James Hogan" <jhogan@kernel.org>,
	"Dan Haab" <riproute@gmail.com>,
	"Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH] MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata
Date: Fri, 23 Mar 2018 23:58:07 +0100	[thread overview]
Message-ID: <20180323225807.13386-1-zajec5@gmail.com> (raw)

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

             reply	other threads:[~2018-03-23 22:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23 22:58 Rafał Miłecki [this message]
2018-03-24  0:52 ` [PATCH] MIPS: BCM47XX: Use __initdata for the bcm47xx_leds_pdata Aaro Koskinen
2018-04-23  4:51 ` Rafał Miłecki
2018-04-24 10:47   ` James Hogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180323225807.13386-1-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=jhogan@kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=rafal@milecki.pl \
    --cc=ralf@linux-mips.org \
    --cc=riproute@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox