Skip to content

Commit

Permalink
leds: lp5523: Fix various formatting issues in the code
Browse files Browse the repository at this point in the history
Fix checkpatch errors and warnings for the LP5523.c device
driver.

Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
  • Loading branch information
Dan Murphy authored and Pavel Machek committed Jul 15, 2020
1 parent 7e6f7f3 commit 7105e46
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions drivers/leds/leds-lp5523.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@

#define LP5523_PROGRAM_LENGTH 32 /* bytes */
/* Memory is used like this:
0x00 engine 1 program
0x10 engine 2 program
0x20 engine 3 program
0x30 engine 1 muxing info
0x40 engine 2 muxing info
0x50 engine 3 muxing info
*/
* 0x00 engine 1 program
* 0x10 engine 2 program
* 0x20 engine 3 program
* 0x30 engine 1 muxing info
* 0x40 engine 2 muxing info
* 0x50 engine 3 muxing info
*/
#define LP5523_MAX_LEDS 9

/* Registers */
Expand Down Expand Up @@ -326,7 +326,7 @@ static int lp5523_update_program_memory(struct lp55xx_chip *chip,
const u8 *data, size_t size)
{
u8 pattern[LP5523_PROGRAM_LENGTH] = {0};
unsigned cmd;
unsigned int cmd;
char c[3];
int nrchars;
int ret;
Expand Down Expand Up @@ -468,6 +468,7 @@ static int lp5523_mux_parse(const char *buf, u16 *mux, size_t len)
static void lp5523_mux_to_array(u16 led_mux, char *array)
{
int i, pos = 0;

for (i = 0; i < LP5523_MAX_LEDS; i++)
pos += sprintf(array + pos, "%x", LED_ACTIVE(led_mux, i));

Expand Down Expand Up @@ -506,7 +507,7 @@ static int lp5523_load_mux(struct lp55xx_chip *chip, u16 mux, int nr)
if (ret)
return ret;

ret = lp55xx_write(chip, LP5523_REG_PROG_MEM , (u8)(mux >> 8));
ret = lp55xx_write(chip, LP5523_REG_PROG_MEM, (u8)(mux >> 8));
if (ret)
return ret;

Expand Down

0 comments on commit 7105e46

Please sign in to comment.