diff options
author | Hui Wang <hui.wang@canonical.com> | 2019-08-20 15:07:01 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-08-20 17:15:36 -0400 |
commit | cfd8579ddc02d8c5024bae7106ba37079653b3d2 (patch) | |
tree | 73fd7dcd7a80e03f3e7fdf9c8b1826d91df922d6 | |
parent | e95656ea15e54d4e6a192d560d84008b53fc1eb5 (diff) |
Input: psmouse - drop all unneeded functions from mouse headers
Recently we had a building error if we enable the MOUSE_PS2_ALPS while
disable the MOUSE_PS2_TRACKPOINT, and was fixed by 49e6979e7e92
("Input: psmouse - fix build error of multiple definition").
We could improve that fix by dropping all unneeded functions and
CONFIG_MOUSE_ guards from the header, it is safe to do that since
those functions are not directly called by psmouse-base.c anymore.
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/mouse/alps.h | 11 | ||||
-rw-r--r-- | drivers/input/mouse/byd.h | 11 | ||||
-rw-r--r-- | drivers/input/mouse/cypress_ps2.h | 11 | ||||
-rw-r--r-- | drivers/input/mouse/elantech.h | 18 | ||||
-rw-r--r-- | drivers/input/mouse/hgpk.h | 13 | ||||
-rw-r--r-- | drivers/input/mouse/lifebook.h | 13 | ||||
-rw-r--r-- | drivers/input/mouse/logips2pp.h | 7 | ||||
-rw-r--r-- | drivers/input/mouse/sentelic.h | 11 | ||||
-rw-r--r-- | drivers/input/mouse/touchkit_ps2.h | 8 | ||||
-rw-r--r-- | drivers/input/mouse/trackpoint.h | 8 | ||||
-rw-r--r-- | drivers/input/mouse/vmmouse.h | 11 |
11 files changed, 8 insertions, 114 deletions
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h index f4bab629739c..0a1048cf23f6 100644 --- a/drivers/input/mouse/alps.h +++ b/drivers/input/mouse/alps.h | |||
@@ -323,18 +323,7 @@ struct alps_data { | |||
323 | 323 | ||
324 | #define ALPS_QUIRK_TRACKSTICK_BUTTONS 1 /* trakcstick buttons in trackstick packet */ | 324 | #define ALPS_QUIRK_TRACKSTICK_BUTTONS 1 /* trakcstick buttons in trackstick packet */ |
325 | 325 | ||
326 | #ifdef CONFIG_MOUSE_PS2_ALPS | ||
327 | int alps_detect(struct psmouse *psmouse, bool set_properties); | 326 | int alps_detect(struct psmouse *psmouse, bool set_properties); |
328 | int alps_init(struct psmouse *psmouse); | 327 | int alps_init(struct psmouse *psmouse); |
329 | #else | ||
330 | inline int alps_detect(struct psmouse *psmouse, bool set_properties) | ||
331 | { | ||
332 | return -ENOSYS; | ||
333 | } | ||
334 | inline int alps_init(struct psmouse *psmouse) | ||
335 | { | ||
336 | return -ENOSYS; | ||
337 | } | ||
338 | #endif /* CONFIG_MOUSE_PS2_ALPS */ | ||
339 | 328 | ||
340 | #endif | 329 | #endif |
diff --git a/drivers/input/mouse/byd.h b/drivers/input/mouse/byd.h index 8cb90d904186..ff2771e2dd2e 100644 --- a/drivers/input/mouse/byd.h +++ b/drivers/input/mouse/byd.h | |||
@@ -2,18 +2,7 @@ | |||
2 | #ifndef _BYD_H | 2 | #ifndef _BYD_H |
3 | #define _BYD_H | 3 | #define _BYD_H |
4 | 4 | ||
5 | #ifdef CONFIG_MOUSE_PS2_BYD | ||
6 | int byd_detect(struct psmouse *psmouse, bool set_properties); | 5 | int byd_detect(struct psmouse *psmouse, bool set_properties); |
7 | int byd_init(struct psmouse *psmouse); | 6 | int byd_init(struct psmouse *psmouse); |
8 | #else | ||
9 | static inline int byd_detect(struct psmouse *psmouse, bool set_properties) | ||
10 | { | ||
11 | return -ENOSYS; | ||
12 | } | ||
13 | static inline int byd_init(struct psmouse *psmouse) | ||
14 | { | ||
15 | return -ENOSYS; | ||
16 | } | ||
17 | #endif /* CONFIG_MOUSE_PS2_BYD */ | ||
18 | 7 | ||
19 | #endif /* _BYD_H */ | 8 | #endif /* _BYD_H */ |
diff --git a/drivers/input/mouse/cypress_ps2.h b/drivers/input/mouse/cypress_ps2.h index 1eaddd818004..bb4979d06bf9 100644 --- a/drivers/input/mouse/cypress_ps2.h +++ b/drivers/input/mouse/cypress_ps2.h | |||
@@ -170,18 +170,7 @@ struct cytp_data { | |||
170 | }; | 170 | }; |
171 | 171 | ||
172 | 172 | ||
173 | #ifdef CONFIG_MOUSE_PS2_CYPRESS | ||
174 | int cypress_detect(struct psmouse *psmouse, bool set_properties); | 173 | int cypress_detect(struct psmouse *psmouse, bool set_properties); |
175 | int cypress_init(struct psmouse *psmouse); | 174 | int cypress_init(struct psmouse *psmouse); |
176 | #else | ||
177 | inline int cypress_detect(struct psmouse *psmouse, bool set_properties) | ||
178 | { | ||
179 | return -ENOSYS; | ||
180 | } | ||
181 | inline int cypress_init(struct psmouse *psmouse) | ||
182 | { | ||
183 | return -ENOSYS; | ||
184 | } | ||
185 | #endif /* CONFIG_MOUSE_PS2_CYPRESS */ | ||
186 | 175 | ||
187 | #endif /* _CYPRESS_PS2_H */ | 176 | #endif /* _CYPRESS_PS2_H */ |
diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h index 46343998522b..e0a3e59d4f1b 100644 --- a/drivers/input/mouse/elantech.h +++ b/drivers/input/mouse/elantech.h | |||
@@ -184,32 +184,18 @@ struct elantech_data { | |||
184 | void (*original_set_rate)(struct psmouse *psmouse, unsigned int rate); | 184 | void (*original_set_rate)(struct psmouse *psmouse, unsigned int rate); |
185 | }; | 185 | }; |
186 | 186 | ||
187 | #ifdef CONFIG_MOUSE_PS2_ELANTECH | ||
188 | int elantech_detect(struct psmouse *psmouse, bool set_properties); | 187 | int elantech_detect(struct psmouse *psmouse, bool set_properties); |
189 | int elantech_init_ps2(struct psmouse *psmouse); | 188 | int elantech_init_ps2(struct psmouse *psmouse); |
189 | |||
190 | #ifdef CONFIG_MOUSE_PS2_ELANTECH | ||
190 | int elantech_init(struct psmouse *psmouse); | 191 | int elantech_init(struct psmouse *psmouse); |
191 | #else | 192 | #else |
192 | static inline int elantech_detect(struct psmouse *psmouse, bool set_properties) | ||
193 | { | ||
194 | return -ENOSYS; | ||
195 | } | ||
196 | static inline int elantech_init(struct psmouse *psmouse) | 193 | static inline int elantech_init(struct psmouse *psmouse) |
197 | { | 194 | { |
198 | return -ENOSYS; | 195 | return -ENOSYS; |
199 | } | 196 | } |
200 | static inline int elantech_init_ps2(struct psmouse *psmouse) | ||
201 | { | ||
202 | return -ENOSYS; | ||
203 | } | ||
204 | #endif /* CONFIG_MOUSE_PS2_ELANTECH */ | 197 | #endif /* CONFIG_MOUSE_PS2_ELANTECH */ |
205 | 198 | ||
206 | #if defined(CONFIG_MOUSE_PS2_ELANTECH_SMBUS) | ||
207 | int elantech_init_smbus(struct psmouse *psmouse); | 199 | int elantech_init_smbus(struct psmouse *psmouse); |
208 | #else | ||
209 | static inline int elantech_init_smbus(struct psmouse *psmouse) | ||
210 | { | ||
211 | return -ENOSYS; | ||
212 | } | ||
213 | #endif /* CONFIG_MOUSE_PS2_ELANTECH_SMBUS */ | ||
214 | 200 | ||
215 | #endif | 201 | #endif |
diff --git a/drivers/input/mouse/hgpk.h b/drivers/input/mouse/hgpk.h index 98b7b384229b..ce041591f1a8 100644 --- a/drivers/input/mouse/hgpk.h +++ b/drivers/input/mouse/hgpk.h | |||
@@ -47,22 +47,15 @@ struct hgpk_data { | |||
47 | int xsaw_secondary, ysaw_secondary; /* jumpiness detection */ | 47 | int xsaw_secondary, ysaw_secondary; /* jumpiness detection */ |
48 | }; | 48 | }; |
49 | 49 | ||
50 | #ifdef CONFIG_MOUSE_PS2_OLPC | ||
51 | void hgpk_module_init(void); | ||
52 | int hgpk_detect(struct psmouse *psmouse, bool set_properties); | 50 | int hgpk_detect(struct psmouse *psmouse, bool set_properties); |
53 | int hgpk_init(struct psmouse *psmouse); | 51 | int hgpk_init(struct psmouse *psmouse); |
52 | |||
53 | #ifdef CONFIG_MOUSE_PS2_OLPC | ||
54 | void hgpk_module_init(void); | ||
54 | #else | 55 | #else |
55 | static inline void hgpk_module_init(void) | 56 | static inline void hgpk_module_init(void) |
56 | { | 57 | { |
57 | } | 58 | } |
58 | static inline int hgpk_detect(struct psmouse *psmouse, bool set_properties) | ||
59 | { | ||
60 | return -ENODEV; | ||
61 | } | ||
62 | static inline int hgpk_init(struct psmouse *psmouse) | ||
63 | { | ||
64 | return -ENODEV; | ||
65 | } | ||
66 | #endif | 59 | #endif |
67 | 60 | ||
68 | #endif | 61 | #endif |
diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h index 573f2ca1983d..d989cca62dd6 100644 --- a/drivers/input/mouse/lifebook.h +++ b/drivers/input/mouse/lifebook.h | |||
@@ -8,22 +8,15 @@ | |||
8 | #ifndef _LIFEBOOK_H | 8 | #ifndef _LIFEBOOK_H |
9 | #define _LIFEBOOK_H | 9 | #define _LIFEBOOK_H |
10 | 10 | ||
11 | #ifdef CONFIG_MOUSE_PS2_LIFEBOOK | ||
12 | void lifebook_module_init(void); | ||
13 | int lifebook_detect(struct psmouse *psmouse, bool set_properties); | 11 | int lifebook_detect(struct psmouse *psmouse, bool set_properties); |
14 | int lifebook_init(struct psmouse *psmouse); | 12 | int lifebook_init(struct psmouse *psmouse); |
13 | |||
14 | #ifdef CONFIG_MOUSE_PS2_LIFEBOOK | ||
15 | void lifebook_module_init(void); | ||
15 | #else | 16 | #else |
16 | static inline void lifebook_module_init(void) | 17 | static inline void lifebook_module_init(void) |
17 | { | 18 | { |
18 | } | 19 | } |
19 | static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties) | ||
20 | { | ||
21 | return -ENOSYS; | ||
22 | } | ||
23 | static inline int lifebook_init(struct psmouse *psmouse) | ||
24 | { | ||
25 | return -ENOSYS; | ||
26 | } | ||
27 | #endif | 20 | #endif |
28 | 21 | ||
29 | #endif | 22 | #endif |
diff --git a/drivers/input/mouse/logips2pp.h b/drivers/input/mouse/logips2pp.h index 5f9344135f70..df885c4874df 100644 --- a/drivers/input/mouse/logips2pp.h +++ b/drivers/input/mouse/logips2pp.h | |||
@@ -8,13 +8,6 @@ | |||
8 | #ifndef _LOGIPS2PP_H | 8 | #ifndef _LOGIPS2PP_H |
9 | #define _LOGIPS2PP_H | 9 | #define _LOGIPS2PP_H |
10 | 10 | ||
11 | #ifdef CONFIG_MOUSE_PS2_LOGIPS2PP | ||
12 | int ps2pp_detect(struct psmouse *psmouse, bool set_properties); | 11 | int ps2pp_detect(struct psmouse *psmouse, bool set_properties); |
13 | #else | ||
14 | static inline int ps2pp_detect(struct psmouse *psmouse, bool set_properties) | ||
15 | { | ||
16 | return -ENOSYS; | ||
17 | } | ||
18 | #endif /* CONFIG_MOUSE_PS2_LOGIPS2PP */ | ||
19 | 12 | ||
20 | #endif | 13 | #endif |
diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h index dc88a93adf85..02cac0e7ad63 100644 --- a/drivers/input/mouse/sentelic.h +++ b/drivers/input/mouse/sentelic.h | |||
@@ -106,19 +106,8 @@ struct fsp_data { | |||
106 | unsigned int last_mt_fgr; /* Last seen finger(multitouch) */ | 106 | unsigned int last_mt_fgr; /* Last seen finger(multitouch) */ |
107 | }; | 107 | }; |
108 | 108 | ||
109 | #ifdef CONFIG_MOUSE_PS2_SENTELIC | ||
110 | extern int fsp_detect(struct psmouse *psmouse, bool set_properties); | 109 | extern int fsp_detect(struct psmouse *psmouse, bool set_properties); |
111 | extern int fsp_init(struct psmouse *psmouse); | 110 | extern int fsp_init(struct psmouse *psmouse); |
112 | #else | ||
113 | static inline int fsp_detect(struct psmouse *psmouse, bool set_properties) | ||
114 | { | ||
115 | return -ENOSYS; | ||
116 | } | ||
117 | static inline int fsp_init(struct psmouse *psmouse) | ||
118 | { | ||
119 | return -ENOSYS; | ||
120 | } | ||
121 | #endif | ||
122 | 111 | ||
123 | #endif /* __KERNEL__ */ | 112 | #endif /* __KERNEL__ */ |
124 | 113 | ||
diff --git a/drivers/input/mouse/touchkit_ps2.h b/drivers/input/mouse/touchkit_ps2.h index 5acb76464a5b..c808fe6c782f 100644 --- a/drivers/input/mouse/touchkit_ps2.h +++ b/drivers/input/mouse/touchkit_ps2.h | |||
@@ -9,14 +9,6 @@ | |||
9 | #ifndef _TOUCHKIT_PS2_H | 9 | #ifndef _TOUCHKIT_PS2_H |
10 | #define _TOUCHKIT_PS2_H | 10 | #define _TOUCHKIT_PS2_H |
11 | 11 | ||
12 | #ifdef CONFIG_MOUSE_PS2_TOUCHKIT | ||
13 | int touchkit_ps2_detect(struct psmouse *psmouse, bool set_properties); | 12 | int touchkit_ps2_detect(struct psmouse *psmouse, bool set_properties); |
14 | #else | ||
15 | static inline int touchkit_ps2_detect(struct psmouse *psmouse, | ||
16 | bool set_properties) | ||
17 | { | ||
18 | return -ENOSYS; | ||
19 | } | ||
20 | #endif /* CONFIG_MOUSE_PS2_TOUCHKIT */ | ||
21 | 13 | ||
22 | #endif | 14 | #endif |
diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h index 77110f3ec21d..5cb93ed26085 100644 --- a/drivers/input/mouse/trackpoint.h +++ b/drivers/input/mouse/trackpoint.h | |||
@@ -155,14 +155,6 @@ struct trackpoint_data { | |||
155 | bool ext_dev; | 155 | bool ext_dev; |
156 | }; | 156 | }; |
157 | 157 | ||
158 | #ifdef CONFIG_MOUSE_PS2_TRACKPOINT | ||
159 | int trackpoint_detect(struct psmouse *psmouse, bool set_properties); | 158 | int trackpoint_detect(struct psmouse *psmouse, bool set_properties); |
160 | #else | ||
161 | static inline int trackpoint_detect(struct psmouse *psmouse, | ||
162 | bool set_properties) | ||
163 | { | ||
164 | return -ENOSYS; | ||
165 | } | ||
166 | #endif /* CONFIG_MOUSE_PS2_TRACKPOINT */ | ||
167 | 159 | ||
168 | #endif /* _TRACKPOINT_H */ | 160 | #endif /* _TRACKPOINT_H */ |
diff --git a/drivers/input/mouse/vmmouse.h b/drivers/input/mouse/vmmouse.h index 774549a12930..90157aecade7 100644 --- a/drivers/input/mouse/vmmouse.h +++ b/drivers/input/mouse/vmmouse.h | |||
@@ -8,20 +8,9 @@ | |||
8 | #ifndef _VMMOUSE_H | 8 | #ifndef _VMMOUSE_H |
9 | #define _VMMOUSE_H | 9 | #define _VMMOUSE_H |
10 | 10 | ||
11 | #ifdef CONFIG_MOUSE_PS2_VMMOUSE | ||
12 | #define VMMOUSE_PSNAME "VirtualPS/2" | 11 | #define VMMOUSE_PSNAME "VirtualPS/2" |
13 | 12 | ||
14 | int vmmouse_detect(struct psmouse *psmouse, bool set_properties); | 13 | int vmmouse_detect(struct psmouse *psmouse, bool set_properties); |
15 | int vmmouse_init(struct psmouse *psmouse); | 14 | int vmmouse_init(struct psmouse *psmouse); |
16 | #else | ||
17 | static inline int vmmouse_detect(struct psmouse *psmouse, bool set_properties) | ||
18 | { | ||
19 | return -ENOSYS; | ||
20 | } | ||
21 | static inline int vmmouse_init(struct psmouse *psmouse) | ||
22 | { | ||
23 | return -ENOSYS; | ||
24 | } | ||
25 | #endif | ||
26 | 15 | ||
27 | #endif | 16 | #endif |