Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 91f8d063 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman
Browse files

USB: consolidate usb_unbind_interface and usb_driver_release_interface



This patch (as1230) consolidates code in usb_unbind_interface() and
usb_driver_release_interface().  In fact, it makes release_interface
call unbind_interface, thereby removing the need for duplicated code.

It works like this: If the interface has already been registered with
the driver core when a driver releases it, then the usual driver-core
mechanism will call unbind_interface.  If it hasn't been unregistered
then we will make the call ourselves.

As a nice bonus, drivers now don't have to worry about whether their
disconnect method will get called when they release an interface -- it
always will.  Previously it would be called only if the interface was
registered.

Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 895f28ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment