diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2018-01-08 20:10:46 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-01-08 20:42:00 -0500 |
commit | da7bdec455b160771f0343e38dc538791f2b2a99 (patch) | |
tree | fcce31f475e6ba87bd0128fa34851aafbfe0431e | |
parent | 28f9fe57ddb2b3a3ce34cf46d30b56b967914ba8 (diff) |
Input: cyapa - remove duplicated macro definitions
Apart from whitespace differences, this block of macros is repeated
twice:
$ x=./drivers/input/mouse/cyapa_gen3.c; diff -w -u <(sed -n '139,181p' $x) <(sed -n '182,224p' $x)
$
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/mouse/cyapa_gen3.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/input/mouse/cyapa_gen3.c b/drivers/input/mouse/cyapa_gen3.c index 1cbfa4a6e830..076dda4a66da 100644 --- a/drivers/input/mouse/cyapa_gen3.c +++ b/drivers/input/mouse/cyapa_gen3.c | |||
@@ -137,49 +137,6 @@ static const u8 bl_exit[] = { 0x00, 0xff, 0xa5, 0x00, 0x01, 0x02, 0x03, 0x04, | |||
137 | 137 | ||
138 | 138 | ||
139 | /* for byte read/write command */ | 139 | /* for byte read/write command */ |
140 | #define CMD_RESET 0 | ||
141 | #define CMD_POWER_MODE 1 | ||
142 | #define CMD_DEV_STATUS 2 | ||
143 | #define CMD_REPORT_MAX_BASELINE 3 | ||
144 | #define CMD_REPORT_MIN_BASELINE 4 | ||
145 | #define SMBUS_BYTE_CMD(cmd) (((cmd) & 0x3f) << 1) | ||
146 | #define CYAPA_SMBUS_RESET SMBUS_BYTE_CMD(CMD_RESET) | ||
147 | #define CYAPA_SMBUS_POWER_MODE SMBUS_BYTE_CMD(CMD_POWER_MODE) | ||
148 | #define CYAPA_SMBUS_DEV_STATUS SMBUS_BYTE_CMD(CMD_DEV_STATUS) | ||
149 | #define CYAPA_SMBUS_MAX_BASELINE SMBUS_BYTE_CMD(CMD_REPORT_MAX_BASELINE) | ||
150 | #define CYAPA_SMBUS_MIN_BASELINE SMBUS_BYTE_CMD(CMD_REPORT_MIN_BASELINE) | ||
151 | |||
152 | /* for group registers read/write command */ | ||
153 | #define REG_GROUP_DATA 0 | ||
154 | #define REG_GROUP_CMD 2 | ||
155 | #define REG_GROUP_QUERY 3 | ||
156 | #define SMBUS_GROUP_CMD(grp) (0x80 | (((grp) & 0x07) << 3)) | ||
157 | #define CYAPA_SMBUS_GROUP_DATA SMBUS_GROUP_CMD(REG_GROUP_DATA) | ||
158 | #define CYAPA_SMBUS_GROUP_CMD SMBUS_GROUP_CMD(REG_GROUP_CMD) | ||
159 | #define CYAPA_SMBUS_GROUP_QUERY SMBUS_GROUP_CMD(REG_GROUP_QUERY) | ||
160 | |||
161 | /* for register block read/write command */ | ||
162 | #define CMD_BL_STATUS 0 | ||
163 | #define CMD_BL_HEAD 1 | ||
164 | #define CMD_BL_CMD 2 | ||
165 | #define CMD_BL_DATA 3 | ||
166 | #define CMD_BL_ALL 4 | ||
167 | #define CMD_BLK_PRODUCT_ID 5 | ||
168 | #define CMD_BLK_HEAD 6 | ||
169 | #define SMBUS_BLOCK_CMD(cmd) (0xc0 | (((cmd) & 0x1f) << 1)) | ||
170 | |||
171 | /* register block read/write command in bootloader mode */ | ||
172 | #define CYAPA_SMBUS_BL_STATUS SMBUS_BLOCK_CMD(CMD_BL_STATUS) | ||
173 | #define CYAPA_SMBUS_BL_HEAD SMBUS_BLOCK_CMD(CMD_BL_HEAD) | ||
174 | #define CYAPA_SMBUS_BL_CMD SMBUS_BLOCK_CMD(CMD_BL_CMD) | ||
175 | #define CYAPA_SMBUS_BL_DATA SMBUS_BLOCK_CMD(CMD_BL_DATA) | ||
176 | #define CYAPA_SMBUS_BL_ALL SMBUS_BLOCK_CMD(CMD_BL_ALL) | ||
177 | |||
178 | /* register block read/write command in operational mode */ | ||
179 | #define CYAPA_SMBUS_BLK_PRODUCT_ID SMBUS_BLOCK_CMD(CMD_BLK_PRODUCT_ID) | ||
180 | #define CYAPA_SMBUS_BLK_HEAD SMBUS_BLOCK_CMD(CMD_BLK_HEAD) | ||
181 | |||
182 | /* for byte read/write command */ | ||
183 | #define CMD_RESET 0 | 140 | #define CMD_RESET 0 |
184 | #define CMD_POWER_MODE 1 | 141 | #define CMD_POWER_MODE 1 |
185 | #define CMD_DEV_STATUS 2 | 142 | #define CMD_DEV_STATUS 2 |