Re: [PATCH v3] staging: HID: Add ShanWan USB WirelessGamepad driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 13 2023 at 06:13:05 PM +02:00:00, Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx> 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?





[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux