Skip to content

Commit

Permalink
DRIVERS: input/mouse: Use "static inline" instead of "inline"
Browse files Browse the repository at this point in the history
The latest GCC 12 (or higher) does not auto-convert "inline"
function into "static inline" function which leads to compile
errors hence this patch fixes related compile errors in mouse
driver headers.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
  • Loading branch information
avpatel committed Dec 28, 2022
1 parent 0f9cf48 commit eb1d1dd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions drivers/input/mouse/alps.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ struct alps_data {
int alps_detect(struct psmouse *psmouse, bool set_properties);
int alps_init(struct psmouse *psmouse);
#else
inline int alps_detect(struct psmouse *psmouse, bool set_properties)
static inline int alps_detect(struct psmouse *psmouse, bool set_properties)
{
return -ENOSYS;
}
inline int alps_init(struct psmouse *psmouse)
static inline int alps_init(struct psmouse *psmouse)
{
return -ENOSYS;
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/input/mouse/lifebook.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ void lifebook_module_init(void);
int lifebook_detect(struct psmouse *psmouse, bool set_properties);
int lifebook_init(struct psmouse *psmouse);
#else
inline void lifebook_module_init(void)
static inline void lifebook_module_init(void)
{
}
inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
{
return -ENOSYS;
}
inline int lifebook_init(struct psmouse *psmouse)
static inline int lifebook_init(struct psmouse *psmouse)
{
return -ENOSYS;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/mouse/logips2pp.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifdef CONFIG_MOUSE_PS2_LOGIPS2PP
int ps2pp_init(struct psmouse *psmouse, bool set_properties);
#else
inline int ps2pp_init(struct psmouse *psmouse, bool set_properties)
static inline int ps2pp_init(struct psmouse *psmouse, bool set_properties)
{
return -ENOSYS;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/input/mouse/sentelic.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ struct fsp_data {
extern int fsp_detect(struct psmouse *psmouse, bool set_properties);
extern int fsp_init(struct psmouse *psmouse);
#else
inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
static inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
{
return -ENOSYS;
}
inline int fsp_init(struct psmouse *psmouse)
static inline int fsp_init(struct psmouse *psmouse)
{
return -ENOSYS;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/mouse/trackpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ 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;
}
Expand Down

0 comments on commit eb1d1dd

Please sign in to comment.