i8042: Do not abuse CONFIG namespace
PATCH 1/1 i8042: Do not abuse CONFIG namespace
This driver uses the CONFIG namespace to set the chips internal CONFIG namespace related bits. However, CONFIG is reserved for the top-level Kconfig based configuration system. Use CFG as the namespace here instead to avoid pollution.
--- drivers/input/i8042.c | 4 ++-- include/i8042.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/input/i8042.c +2 -2
@@ -150,8 +150,8 @@ static int kbd_reset(int quirk)else if ((quirk &QUIRK_DUP_POR ) && config ==KBD_POR ) config =kbd_cmd_read (CMD_RD_CONFIG ); - config |=CONFIG_AT_TRANS ; - config &= ~(CONFIG_KIRQ_EN |CONFIG_MIRQ_EN ); + config |=CFG_AT_TRANS ; + config &= ~(CFG_KIRQ_EN |CFG_MIRQ_EN );if (kbd_cmd_write (CMD_WR_CONFIG , config)) goto err;
include/i8042.h +6 -6
@@ -20,12 +20,12 @@#define STATUS_IBF (1 << 1)/* Configuration byte bit defines */ -#define CONFIG_KIRQ_EN (1 << 0) -#define CONFIG_MIRQ_EN (1 << 1) -#define CONFIG_SET_BIST (1 << 2) -#define CONFIG_KCLK_DIS (1 << 4) -#define CONFIG_MCLK_DIS (1 << 5) -#define CONFIG_AT_TRANS (1 << 6) +#define CFG_KIRQ_EN (1 << 0) +#define CFG_MIRQ_EN (1 << 1) +#define CFG_SET_BIST (1 << 2) +#define CFG_KCLK_DIS (1 << 4) +#define CFG_MCLK_DIS (1 << 5) +#define CFG_AT_TRANS (1 << 6)/* i8042 commands */ #define CMD_RD_CONFIG 0x20/* read configuration byte */
Signature · 1 line
2.17.1
Quoted 6 lines · Tom Rini
This driver uses the CONFIG namespace to set the chips internal CONFIG namespace related bits. However, CONFIG is reserved for the top-level
Kconfigbased configuration system. Use CFG as the namespace here instead to avoid pollution.
Quoted 6 lines
Signed-off-by Tom Rini <[email protected]>--- drivers/input/i8042.c | 4 ++-- include/i8042.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-)
Quoted 7 lines · Tom Rini
This driver uses the CONFIG namespace to set the chips internal CONFIG namespace related bits. However, CONFIG is reserved for the top-level
Kconfigbased configuration system. Use CFG as the namespace here instead to avoid pollution.Signed-off-by Tom Rini <[email protected]>Reviewed-by Bin Meng <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom