linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mubashshir <ahmubashshir@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	Huseyin BIYIK <huseyinbiyik@hotmail.com>,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH v3] staging: HID: Add ShanWan USB WirelessGamepad driver
Date: Wed, 19 Apr 2023 12:36:03 +0600	[thread overview]
Message-ID: <3ONCTR.Q80RY3TDW2I8@gmail.com> (raw)
In-Reply-To: <20230413161305.ywthwbu3ta3mv66b@mail.corp.redhat.com>

On Thu, Apr 13 2023 at 06:13:05 PM +02:00:00, Benjamin Tissoires 
<benjamin.tissoires@redhat.com> wrote:
> What's the point of keeping it opened for the lifetime of the device? 
> Do
> you really need this?
> 
>>  +	if (error) {
>>  +		dev_err(&hdev->dev, "hw open failed\n");
>>  +		hid_hw_stop(hdev);
>>  +		return error;
>>  +	}
>>  +
>>  +	return 0;
>>  +}
>>  +
>>  +static void shanwan_remove(struct hid_device *hdev)
>>  +{
>>  +	hid_hw_close(hdev);
> 
> If you can drop the last hid_hw_open/close, then you can entirely skip
> the ->remove().

Would hid_hw_request work without open device?



  reply	other threads:[~2023-04-19  6:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10  9:17 [PATCH] staging: HID: Add ShanWan USB WirelessGamepad driver Mubashshir
2023-04-10 11:59 ` [PATCH v2] " Mubashshir
2023-04-10 12:04   ` Mubashshir
2023-04-10 12:30 ` [PATCH] " kernel test robot
2023-04-10 12:59 ` [PATCH v3] " Mubashshir
2023-04-13 16:13   ` Benjamin Tissoires
2023-04-19  6:36     ` Mubashshir [this message]
2023-04-25  9:04       ` Benjamin Tissoires
2023-04-25  9:06         ` Mubashshir
2023-05-15 12:42 ` [PATCH v4] " Mubashshir
2023-05-15 14:01 ` [PATCH v5] " Mubashshir

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=3ONCTR.Q80RY3TDW2I8@gmail.com \
    --to=ahmubashshir@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=huseyinbiyik@hotmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).