drivers/muic: Fix '"WRITE" redefined' error after CVE-2019-2001 fix
Compile error: In file included from kernel/samsung/gts2/drivers/muic/universal/muic_task.c:49:0: kernel/samsung/gts2/drivers/muic/universal/muic_debug.h:6:0: error: "WRITE" redefined [-Werror] #define WRITE 1 ^ In file included from kernel/samsung/gts2/include/linux/seq_file.h:10:0, from kernel/samsung/gts2/include/linux/pinctrl/pinctrl.h:19, from kernel/samsung/gts2/include/asm-generic/gpio.h:8, from kernel/samsung/gts2/arch/arm/include/asm/gpio.h:15, from kernel/samsung/gts2/include/linux/gpio.h:45, from kernel/samsung/gts2/drivers/muic/universal/muic_task.c:23: kernel/samsung/gts2/include/linux/fs.h:192:0: note: this is the location of the previous definition #define WRITE RW_MASK Fix is to change the define statements in drivers/muic/universal/muic_debug.h, used in drivers/muic/universal/muic_i2c.c as follows WRITE >> DBG_WRITE, READ >> DBG_READ to avoid the duplicate definition contradiction. Change-Id: Ie2416adb3987fe16011fe1d14e24934218273a8a
This commit is contained in:
parent
278c64a80a
commit
1251eb1446
|
@ -2,8 +2,8 @@
|
|||
#define _MUIC_DEBUG_
|
||||
|
||||
#define DEBUG_MUIC
|
||||
#define READ 0
|
||||
#define WRITE 1
|
||||
#define DBG_READ 0
|
||||
#define DBG_WRITE 1
|
||||
|
||||
extern void muic_reg_log(u8 reg, u8 value, u8 rw);
|
||||
extern void muic_print_reg_log(void);
|
||||
|
|
|
@ -64,7 +64,7 @@ int muic_i2c_read_byte(const struct i2c_client *client, u8 command)
|
|||
}
|
||||
|
||||
#ifdef DEBUG_MUIC
|
||||
muic_reg_log(command, ret, retry << 1| READ);
|
||||
muic_reg_log(command, ret, retry << 1| DBG_READ);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ int muic_i2c_write_byte(const struct i2c_client *client,
|
|||
retry ++;
|
||||
}
|
||||
#ifdef DEBUG_MUIC
|
||||
muic_reg_log(command, value, retry << 1| WRITE);
|
||||
muic_reg_log(command, value, retry << 1| DBG_WRITE);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue