Skip to contentSkip to conversation

Input: psmouse - rename ps2pp_init() to ps2pp_detect()

PATCH In review Dmitry Torokhov 2 participants 2 messages Dec 2, 2015 – Dec 3, 2015

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH v2 1/1 Input: psmouse - rename ps2pp_init() to ps2pp_detect()

This makes Logitech PS2++ protocol implementation consistent with the naming in other protocols. Also mark the stub as "static inline"

---

V2: add forgotten drivers/input/mouse/logips2pp.c file.

 drivers/input/mouse/logips2pp.c    | 2 +-
 drivers/input/mouse/logips2pp.h    | 4 ++--
 drivers/input/mouse/psmouse-base.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/input/mouse/logips2pp.c +1 -1
index 136e222..422da1c 100644
@@ -325,7 +325,7 @@ static void ps2pp_set_model_properties(struct psmouse *psmouse,
  * that support it.
  */
 
-int ps2pp_init(struct psmouse *psmouse, bool set_properties)
+int ps2pp_detect(struct psmouse *psmouse, bool set_properties)
 {
 	struct ps2dev *ps2dev = &psmouse->ps2dev;
 	unsigned char param[4];
drivers/input/mouse/logips2pp.h +2 -2
index 0c186f0..bf62945 100644
@@ -12,9 +12,9 @@
 #define _LOGIPS2PP_H
 
 #ifdef CONFIG_MOUSE_PS2_LOGIPS2PP
-int ps2pp_init(struct psmouse *psmouse, bool set_properties);
+int ps2pp_detect(struct psmouse *psmouse, bool set_properties);
 #else
-inline int ps2pp_init(struct psmouse *psmouse, bool set_properties)
+static inline int ps2pp_detect(struct psmouse *psmouse, bool set_properties)
 {
 	return -ENOSYS;
 }
drivers/input/mouse/psmouse-base.c +1 -1
index e909c6e..90d9218 100644
@@ -699,7 +699,7 @@ static const struct psmouse_protocol psmouse_protocols[] = {
 		.type		= PSMOUSE_PS2PP,
 		.name		= "PS2++",
 		.alias		= "logitech",
-		.detect		= ps2pp_init,
+		.detect		= ps2pp_detect,
 	},
 #endif
 	{
Signature · 5 lines
2.6.0.rc2.230.g3dd15c0


-- 
Dmitry
Reviewed-by on v2 1/1
#1 lore raw

Hi,

Quoted 4 lines · Dmitry Torokhov

This makes Logitech PS2++ protocol implementation consistent with the naming in other protocols. Also mark the stub as "static inline"

Much better / less confusing then the old code :)

Regards,

hans

Quoted 52 lines

---

V2: add forgotten drivers/input/mouse/logips2pp.c file.

  drivers/input/mouse/logips2pp.c    | 2 +-
  drivers/input/mouse/logips2pp.h    | 4 ++--
  drivers/input/mouse/psmouse-base.c | 2 +-
  3 files changed, 4 insertions(+), 4 deletions(-)
drivers/input/mouse/logips2pp.c +1 -1
index 136e222..422da1c 100644
@@ -325,7 +325,7 @@ static void ps2pp_set_model_properties(struct psmouse *psmouse,
   * that support it.
   */
 
-int ps2pp_init(struct psmouse *psmouse, bool set_properties)
+int ps2pp_detect(struct psmouse *psmouse, bool set_properties)
  {
  	struct ps2dev *ps2dev = &psmouse->ps2dev;
  	unsigned char param[4];
drivers/input/mouse/logips2pp.h +2 -2
index 0c186f0..bf62945 100644
@@ -12,9 +12,9 @@
  #define _LOGIPS2PP_H
 
  #ifdef CONFIG_MOUSE_PS2_LOGIPS2PP
-int ps2pp_init(struct psmouse *psmouse, bool set_properties);
+int ps2pp_detect(struct psmouse *psmouse, bool set_properties);
  #else
-inline int ps2pp_init(struct psmouse *psmouse, bool set_properties)
+static inline int ps2pp_detect(struct psmouse *psmouse, bool set_properties)
  {
  	return -ENOSYS;
  }
drivers/input/mouse/psmouse-base.c +1 -1
index e909c6e..90d9218 100644
@@ -699,7 +699,7 @@ static const struct psmouse_protocol psmouse_protocols[] = {
  		.type		= PSMOUSE_PS2PP,
  		.name		= "PS2++",
  		.alias		= "logitech",
-		.detect		= ps2pp_init,
+		.detect		= ps2pp_detect,
  	},
  #endif
  	{