The disconnect callback in struct usb_composite_driver has no user except the conditional call here in composite. So I remove it. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- drivers/usb/gadget/composite.c | 2 -- include/linux/usb/composite.h | 3 --- 2 files changed, 0 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index c30cf2a..f6559d9 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1347,8 +1347,6 @@ static void composite_disconnect(struct usb_gadget *gadget) spin_lock_irqsave(&cdev->lock, flags); if (cdev->config) reset_config(cdev); - if (composite->disconnect) - composite->disconnect(cdev); spin_unlock_irqrestore(&cdev->lock, flags); } diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index be4c1b2..f31e1d8 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h @@ -259,7 +259,6 @@ int usb_add_config(struct usb_composite_dev *, * a serial number. If one is not provided, warning will be printed. * @unbind: Reverses bind; called as a side effect of unregistering * this driver. - * @disconnect: optional driver disconnect method * @suspend: Notifies when the host stops sending USB traffic, * after function notifications * @resume: Notifies configuration when the host restarts USB traffic, @@ -287,8 +286,6 @@ struct usb_composite_driver { int (*unbind)(struct usb_composite_dev *); - void (*disconnect)(struct usb_composite_dev *); - /* global suspend hooks */ void (*suspend)(struct usb_composite_dev *); void (*resume)(struct usb_composite_dev *); -- 1.7.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html