Skip to content

Commit 49e6979

Browse files
YueHaibingdtor
authored andcommitted
Input: psmouse - fix build error of multiple definition
trackpoint_detect() should be static inline while CONFIG_MOUSE_PS2_TRACKPOINT is not set, otherwise, we build fails: drivers/input/mouse/alps.o: In function `trackpoint_detect': alps.c:(.text+0x8e00): multiple definition of `trackpoint_detect' drivers/input/mouse/psmouse-base.o:psmouse-base.c:(.text+0x1b50): first defined here Reported-by: Hulk Robot <[email protected]> Fixes: 55e3d92 ("Input: psmouse - allow disabing certain protocol extensions") Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent d56fef0 commit 49e6979

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/input/mouse/trackpoint.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ struct trackpoint_data {
158158
#ifdef CONFIG_MOUSE_PS2_TRACKPOINT
159159
int trackpoint_detect(struct psmouse *psmouse, bool set_properties);
160160
#else
161-
inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
161+
static inline int trackpoint_detect(struct psmouse *psmouse,
162+
bool set_properties)
162163
{
163164
return -ENOSYS;
164165
}

0 commit comments

Comments
 (0)