diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-07-16 20:17:20 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-10-31 22:15:05 +0000 |
commit | 7d38923f3c1c0795fbb0180ef514611cf5e41fff (patch) | |
tree | 93482eaf878b691bd7a9615b4527c75e2f0d8a9f | |
parent | 28630af424f21fb71119278891cd2845df5bf3cd (diff) |
Input: psmouse - fix build error of multiple definition
commit 49e6979e7e92cf496105b5636f1df0ac17c159c0 upstream.
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 <hulkci@huawei.com>
Fixes: 55e3d9224b60 ("Input: psmouse - allow disabing certain protocol extensions")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/input/mouse/trackpoint.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h index 2d7be0435957..d0e0136dcf0c 100644 --- a/drivers/input/mouse/trackpoint.h +++ b/drivers/input/mouse/trackpoint.h @@ -148,7 +148,8 @@ struct trackpoint_data #ifdef CONFIG_MOUSE_PS2_TRACKPOINT int trackpoint_detect(struct psmouse *psmouse, bool set_properties); #else -inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties) +static inline int trackpoint_detect(struct psmouse *psmouse, + bool set_properties) { return -ENOSYS; } |