diff mbox series

[1/2] HID: redragon: Fix regression in non-Redragon keyboard due to this new driver

Message ID CAPotdmT-zCVL=hoV0y83bbksTQ3AWsCybzisL8B6n-OB-M645g@mail.gmail.com (mailing list archive)
State New, archived
Headers show
Series "HID: redragon: Fix modifier keys for Redragon Asura Keyboard" causes regression for Acer keyboard | expand

Commit Message

John S Gruber July 28, 2018, 7:53 p.m. UTC
The Redragon keyboard uses the second device being presented, but other
devices with the same vendor_id/device_id pair (0x0c45:760b) use the first.
Don't cause its deletion. Problem introduced in commit 85455dd906d5
("HID: redragon: Fix modifier keys for Redragon Asura Keyboard")

Fixes: 85455dd906d5
Signed-off-by: John S Gruber <JohnSGruber@gmail.com>
---
 drivers/hid/hid-redragon.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Robert Munteanu July 30, 2018, 2:05 p.m. UTC | #1
Hi John,

On Sat, 2018-07-28 at 15:53 -0400, John S Gruber wrote:
> The Redragon keyboard uses the second device being presented, but
> other
> devices with the same vendor_id/device_id pair (0x0c45:760b) use the
> first.
> Don't cause its deletion. Problem introduced in commit 85455dd906d5
> ("HID: redragon: Fix modifier keys for Redragon Asura Keyboard")
> 
> Fixes: 85455dd906d5
> Signed-off-by: John S Gruber <JohnSGruber@gmail.com>
> ---
>  drivers/hid/hid-redragon.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/hid/hid-redragon.c b/drivers/hid/hid-redragon.c
> index daf5957..85a5fbb 100644
> --- a/drivers/hid/hid-redragon.c
> +++ b/drivers/hid/hid-redragon.c
> @@ -55,10 +55,6 @@ static int redragon_probe(struct hid_device *dev,
>  		return ret;
>  	}
> 
> -	/* do not register unused input device */
> -	if (dev->maxapplication == 1)
> -		return 0;
> -
>  	ret = hid_hw_start(dev, HID_CONNECT_DEFAULT);
>  	if (ret) {
>  		hid_err(dev, "hw start failed\n");

As I mentioned, this is already fixed by
dc9b8e85ed95cbe7e3ad0eabb5b48d617bbc365e, scheduled for 4.19, and I
suggest that we instead add that one to 4.18.

The explanation is that the block you deleted was the whole reason for
adding the redragon_probe function, so the changes are largely
equivalent.

Thanks,

Robert

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
John S Gruber Aug. 1, 2018, 8:46 p.m. UTC | #2
Right, Robert.

I tested it and it works to solve the problem I reported.

On Mon, Jul 30, 2018 at 10:05 AM Robert Munteanu <rombert@apache.org> wrote:

> Hi John,
>
> On Sat, 2018-07-28 at 15:53 -0400, John S Gruber wrote:
> > The Redragon keyboard uses the second device being presented, but
> > other
> > devices with the same vendor_id/device_id pair (0x0c45:760b) use the
> > first.
> > Don't cause its deletion. Problem introduced in commit 85455dd906d5
> > ("HID: redragon: Fix modifier keys for Redragon Asura Keyboard")
> >
> > Fixes: 85455dd906d5
> > Signed-off-by: John S Gruber <JohnSGruber@gmail.com>
> > ---
> >  drivers/hid/hid-redragon.c | 4 ----
> >  1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/hid/hid-redragon.c b/drivers/hid/hid-redragon.c
> > index daf5957..85a5fbb 100644
> > --- a/drivers/hid/hid-redragon.c
> > +++ b/drivers/hid/hid-redragon.c
> > @@ -55,10 +55,6 @@ static int redragon_probe(struct hid_device *dev,
> >               return ret;
> >       }
> >
> > -     /* do not register unused input device */
> > -     if (dev->maxapplication == 1)
> > -             return 0;
> > -
> >       ret = hid_hw_start(dev, HID_CONNECT_DEFAULT);
> >       if (ret) {
> >               hid_err(dev, "hw start failed\n");
>
> As I mentioned, this is already fixed by
> dc9b8e85ed95cbe7e3ad0eabb5b48d617bbc365e, scheduled for 4.19, and I
> suggest that we instead add that one to 4.18.
>
> The explanation is that the block you deleted was the whole reason for
> adding the redragon_probe function, so the changes are largely
> equivalent.
>
> Thanks,
>
> Robert
>
>
<div dir="ltr">Right, Robert.<div><br></div><div>I tested it and it works to solve the problem I reported.</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 30, 2018 at 10:05 AM Robert Munteanu &lt;<a href="mailto:rombert@apache.org">rombert@apache.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi John,<br>
<br>
On Sat, 2018-07-28 at 15:53 -0400, John S Gruber wrote:<br>
&gt; The Redragon keyboard uses the second device being presented, but<br>
&gt; other<br>
&gt; devices with the same vendor_id/device_id pair (0x0c45:760b) use the<br>
&gt; first.<br>
&gt; Don&#39;t cause its deletion. Problem introduced in commit 85455dd906d5<br>
&gt; (&quot;HID: redragon: Fix modifier keys for Redragon Asura Keyboard&quot;)<br>
&gt; <br>
&gt; Fixes: 85455dd906d5<br>
&gt; Signed-off-by: John S Gruber &lt;<a href="mailto:JohnSGruber@gmail.com" target="_blank">JohnSGruber@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  drivers/hid/hid-redragon.c | 4 ----<br>
&gt;  1 file changed, 4 deletions(-)<br>
&gt; <br>
&gt; diff --git a/drivers/hid/hid-redragon.c b/drivers/hid/hid-redragon.c<br>
&gt; index daf5957..85a5fbb 100644<br>
&gt; --- a/drivers/hid/hid-redragon.c<br>
&gt; +++ b/drivers/hid/hid-redragon.c<br>
&gt; @@ -55,10 +55,6 @@ static int redragon_probe(struct hid_device *dev,<br>
&gt;               return ret;<br>
&gt;       }<br>
&gt; <br>
&gt; -     /* do not register unused input device */<br>
&gt; -     if (dev-&gt;maxapplication == 1)<br>
&gt; -             return 0;<br>
&gt; -<br>
&gt;       ret = hid_hw_start(dev, HID_CONNECT_DEFAULT);<br>
&gt;       if (ret) {<br>
&gt;               hid_err(dev, &quot;hw start failed\n&quot;);<br>
<br>
As I mentioned, this is already fixed by<br>
dc9b8e85ed95cbe7e3ad0eabb5b48d617bbc365e, scheduled for 4.19, and I<br>
suggest that we instead add that one to 4.18.<br>
<br>
The explanation is that the block you deleted was the whole reason for<br>
adding the redragon_probe function, so the changes are largely<br>
equivalent.<br>
<br>
Thanks,<br>
<br>
Robert<br>
<br>
</blockquote></div>
diff mbox series

Patch

diff --git a/drivers/hid/hid-redragon.c b/drivers/hid/hid-redragon.c
index daf5957..85a5fbb 100644
--- a/drivers/hid/hid-redragon.c
+++ b/drivers/hid/hid-redragon.c
@@ -55,10 +55,6 @@  static int redragon_probe(struct hid_device *dev,
 		return ret;
 	}

-	/* do not register unused input device */
-	if (dev->maxapplication == 1)
-		return 0;
-
 	ret = hid_hw_start(dev, HID_CONNECT_DEFAULT);
 	if (ret) {
 		hid_err(dev, "hw start failed\n");