Linux Input/HID development
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH 3/6] HID: asus: Add hid_is_using_ll_driver(usb_hid_driver) check
Date: Wed, 6 May 2020 10:41:34 +0200	[thread overview]
Message-ID: <85945c78-5ed6-a780-e562-27c710710a8f@redhat.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.2005051631560.25812@cbobk.fhfr.pm>

Hi,

On 5/5/20 4:32 PM, Jiri Kosina wrote:
> On Tue, 28 Apr 2020, Hans de Goede wrote:
> 
>> Add a hid_is_using_ll_driver(usb_hid_driver) check to ensure that the
>> parent device is an usb_interface, before casting the parent device
>> pointer to an usb_interface pointer with to_usb_interface().
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   drivers/hid/hid-asus.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
>> index b3292ff3f61a..719eff589f92 100644
>> --- a/drivers/hid/hid-asus.c
>> +++ b/drivers/hid/hid-asus.c
>> @@ -842,7 +842,8 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
>>   	if (drvdata->quirks & QUIRK_IS_MULTITOUCH)
>>   		drvdata->tp = &asus_i2c_tp;
>>   
>> -	if (drvdata->quirks & QUIRK_T100_KEYBOARD) {
>> +	if ((drvdata->quirks & QUIRK_T100_KEYBOARD) &&
>> +	    hid_is_using_ll_driver(hdev, &usb_hid_driver)) {
>>   		struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
>>   
> 
> I am going to push the whole patchset to for-5.8/asus branch later today,

Thanks.

> but I guess this one should better be taken as 5.7 fix still, right?

I know that Benjamin has been insisting on these extra checks, which
is why I added it. But in practice not having the check does not really
seem to be a big issue, so whether to add it to 5.7.x or not is your call.

Regards,

Hans


  reply	other threads:[~2020-05-06  8:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 14:22 [PATCH 1/6] HID: asus: Only set EV_REP if we are adding a mapping Hans de Goede
2020-04-28 14:22 ` [PATCH 2/6] HID: asus: Simplify skipping of mappings for Asus T100CHI keyboard-dock Hans de Goede
2020-04-28 14:22 ` [PATCH 3/6] HID: asus: Add hid_is_using_ll_driver(usb_hid_driver) check Hans de Goede
2020-05-05 14:32   ` Jiri Kosina
2020-05-06  8:41     ` Hans de Goede [this message]
2020-05-06  9:42       ` Jiri Kosina
2020-04-28 14:22 ` [PATCH 4/6] HID: asus: Add report_size to struct asus_touchpad_info Hans de Goede
2020-04-28 14:22 ` [PATCH 5/6] HID: asus: Add support for multi-touch touchpad on Medion Akoya E1239T Hans de Goede
2020-04-28 14:22 ` [PATCH 6/6] HID: asus: Fix mute and touchpad-toggle keys " Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85945c78-5ed6-a780-e562-27c710710a8f@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox