Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d06cb46c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

drivers/leds/leds-lp5523.c: constify some data



Saves ~50 bytes text and speeds things up.

Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 42960b76
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -152,7 +152,7 @@ static inline struct lp5523_chip *led_to_lp5523(struct lp5523_led *led)


static int lp5523_set_mode(struct lp5523_engine *engine, u8 mode);
static int lp5523_set_mode(struct lp5523_engine *engine, u8 mode);
static int lp5523_set_engine_mode(struct lp5523_engine *engine, u8 mode);
static int lp5523_set_engine_mode(struct lp5523_engine *engine, u8 mode);
static int lp5523_load_program(struct lp5523_engine *engine, u8 *pattern);
static int lp5523_load_program(struct lp5523_engine *engine, const u8 *pattern);


static void lp5523_led_brightness_work(struct work_struct *work);
static void lp5523_led_brightness_work(struct work_struct *work);


@@ -196,7 +196,7 @@ static int lp5523_configure(struct i2c_client *client)
	u8 status;
	u8 status;


	/* one pattern per engine setting led mux start and stop addresses */
	/* one pattern per engine setting led mux start and stop addresses */
	u8 pattern[][LP5523_PROGRAM_LENGTH] =  {
	static const u8 pattern[][LP5523_PROGRAM_LENGTH] =  {
		{ 0x9c, 0x30, 0x9c, 0xb0, 0x9d, 0x80, 0xd8, 0x00, 0},
		{ 0x9c, 0x30, 0x9c, 0xb0, 0x9d, 0x80, 0xd8, 0x00, 0},
		{ 0x9c, 0x40, 0x9c, 0xc0, 0x9d, 0x80, 0xd8, 0x00, 0},
		{ 0x9c, 0x40, 0x9c, 0xc0, 0x9d, 0x80, 0xd8, 0x00, 0},
		{ 0x9c, 0x50, 0x9c, 0xd0, 0x9d, 0x80, 0xd8, 0x00, 0},
		{ 0x9c, 0x50, 0x9c, 0xd0, 0x9d, 0x80, 0xd8, 0x00, 0},
@@ -301,7 +301,7 @@ static int lp5523_load_mux(struct lp5523_engine *engine, u16 mux)
	return ret;
	return ret;
}
}


static int lp5523_load_program(struct lp5523_engine *engine, u8 *pattern)
static int lp5523_load_program(struct lp5523_engine *engine, const u8 *pattern)
{
{
	struct lp5523_chip *chip = engine_to_lp5523(engine);
	struct lp5523_chip *chip = engine_to_lp5523(engine);
	struct i2c_client *client = chip->client;
	struct i2c_client *client = chip->client;