Commit cfd8579d authored by Hui Wang's avatar Hui Wang Committed by Dmitry Torokhov
Browse files

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 49e6979e
("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: default avatarHui Wang <hui.wang@canonical.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent e95656ea
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -323,18 +323,7 @@ struct alps_data {

#define ALPS_QUIRK_TRACKSTICK_BUTTONS	1 /* trakcstick buttons in trackstick packet */

#ifdef CONFIG_MOUSE_PS2_ALPS
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)
{
	return -ENOSYS;
}
inline int alps_init(struct psmouse *psmouse)
{
	return -ENOSYS;
}
#endif /* CONFIG_MOUSE_PS2_ALPS */

#endif
+0 −11
Original line number Diff line number Diff line
@@ -2,18 +2,7 @@
#ifndef _BYD_H
#define _BYD_H

#ifdef CONFIG_MOUSE_PS2_BYD
int byd_detect(struct psmouse *psmouse, bool set_properties);
int byd_init(struct psmouse *psmouse);
#else
static inline int byd_detect(struct psmouse *psmouse, bool set_properties)
{
	return -ENOSYS;
}
static inline int byd_init(struct psmouse *psmouse)
{
	return -ENOSYS;
}
#endif /* CONFIG_MOUSE_PS2_BYD */

#endif /* _BYD_H */
+0 −11
Original line number Diff line number Diff line
@@ -170,18 +170,7 @@ struct cytp_data {
};


#ifdef CONFIG_MOUSE_PS2_CYPRESS
int cypress_detect(struct psmouse *psmouse, bool set_properties);
int cypress_init(struct psmouse *psmouse);
#else
inline int cypress_detect(struct psmouse *psmouse, bool set_properties)
{
	return -ENOSYS;
}
inline int cypress_init(struct psmouse *psmouse)
{
	return -ENOSYS;
}
#endif /* CONFIG_MOUSE_PS2_CYPRESS */

#endif  /* _CYPRESS_PS2_H */
+2 −16
Original line number Diff line number Diff line
@@ -184,32 +184,18 @@ struct elantech_data {
	void (*original_set_rate)(struct psmouse *psmouse, unsigned int rate);
};

#ifdef CONFIG_MOUSE_PS2_ELANTECH
int elantech_detect(struct psmouse *psmouse, bool set_properties);
int elantech_init_ps2(struct psmouse *psmouse);

#ifdef CONFIG_MOUSE_PS2_ELANTECH
int elantech_init(struct psmouse *psmouse);
#else
static inline int elantech_detect(struct psmouse *psmouse, bool set_properties)
{
	return -ENOSYS;
}
static inline int elantech_init(struct psmouse *psmouse)
{
	return -ENOSYS;
}
static inline int elantech_init_ps2(struct psmouse *psmouse)
{
	return -ENOSYS;
}
#endif /* CONFIG_MOUSE_PS2_ELANTECH */

#if defined(CONFIG_MOUSE_PS2_ELANTECH_SMBUS)
int elantech_init_smbus(struct psmouse *psmouse);
#else
static inline int elantech_init_smbus(struct psmouse *psmouse)
{
	return -ENOSYS;
}
#endif /* CONFIG_MOUSE_PS2_ELANTECH_SMBUS */

#endif
+3 −10
Original line number Diff line number Diff line
@@ -47,22 +47,15 @@ struct hgpk_data {
	int xsaw_secondary, ysaw_secondary; /* jumpiness detection */
};

#ifdef CONFIG_MOUSE_PS2_OLPC
void hgpk_module_init(void);
int hgpk_detect(struct psmouse *psmouse, bool set_properties);
int hgpk_init(struct psmouse *psmouse);

#ifdef CONFIG_MOUSE_PS2_OLPC
void hgpk_module_init(void);
#else
static inline void hgpk_module_init(void)
{
}
static inline int hgpk_detect(struct psmouse *psmouse, bool set_properties)
{
	return -ENODEV;
}
static inline int hgpk_init(struct psmouse *psmouse)
{
	return -ENODEV;
}
#endif

#endif
Loading