[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <43e7a79f-5ee2-39d2-c86e-633864472e9a@suse.com>
Date: Thu, 19 May 2022 16:12:08 +0200
From: Oliver Neukum <oneukum@...e.com>
To: Dmytro Bagrii <dimich.dmb@...il.com>, gregkh@...uxfoundation.org
CC: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: core: Call disconnect() only if it is provided by
driver
On 19.05.22 15:29, Dmytro Bagrii wrote:
> A driver may use devres allocations. Disconnect handler is not needed in
> this case. Allow such driver to leave .disconnect field uninitialized in
> struct usb_driver instead of providing empty stub function.
It is needed. disconnect() means that you have to give up
ownership of the interface and must cease IO. That cannot
be done with devres.
I am pretty sure that a driver without disconnect() is buggy.
disconnect() is the one method that is really not optional.
Regards
Oliver
Powered by blists - more mailing lists