linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Input: psmouse - rename ps2pp_init() to ps2pp_detect()
@ 2015-12-02 19:25 Dmitry Torokhov
  2015-12-03  8:34 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2015-12-02 19:25 UTC (permalink / raw)
  To: linux-input, Hans de Goede; +Cc: linux-kernel

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

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

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(-)

diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c
index 136e222..422da1c 100644
--- a/drivers/input/mouse/logips2pp.c
+++ b/drivers/input/mouse/logips2pp.c
@@ -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];
diff --git a/drivers/input/mouse/logips2pp.h b/drivers/input/mouse/logips2pp.h
index 0c186f0..bf62945 100644
--- a/drivers/input/mouse/logips2pp.h
+++ b/drivers/input/mouse/logips2pp.h
@@ -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;
 }
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index e909c6e..90d9218 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -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
 	{
-- 
2.6.0.rc2.230.g3dd15c0


-- 
Dmitry

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] Input: psmouse - rename ps2pp_init() to ps2pp_detect()
  2015-12-02 19:25 [PATCH v2] Input: psmouse - rename ps2pp_init() to ps2pp_detect() Dmitry Torokhov
@ 2015-12-03  8:34 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2015-12-03  8:34 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input; +Cc: linux-kernel

Hi,

On 02-12-15 20:25, Dmitry Torokhov wrote:
> This makes Logitech PS2++ protocol implementation consistent with
> the naming in other protocols. Also mark the stub as "static inline"
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Much better / less confusing then the old code :)

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

hans



> ---
>
> 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(-)
>
> diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c
> index 136e222..422da1c 100644
> --- a/drivers/input/mouse/logips2pp.c
> +++ b/drivers/input/mouse/logips2pp.c
> @@ -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];
> diff --git a/drivers/input/mouse/logips2pp.h b/drivers/input/mouse/logips2pp.h
> index 0c186f0..bf62945 100644
> --- a/drivers/input/mouse/logips2pp.h
> +++ b/drivers/input/mouse/logips2pp.h
> @@ -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;
>   }
> diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
> index e909c6e..90d9218 100644
> --- a/drivers/input/mouse/psmouse-base.c
> +++ b/drivers/input/mouse/psmouse-base.c
> @@ -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
>   	{
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-03  8:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-02 19:25 [PATCH v2] Input: psmouse - rename ps2pp_init() to ps2pp_detect() Dmitry Torokhov
2015-12-03  8:34 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).