From 5d14f323834eeb0cd428bcec4a9cd8d8839467fb Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Fri, 19 Sep 2014 17:32:19 +0200 Subject: [PATCH] usb: hub: keep hub->dev reference all the time when struct usb_hub lives This is just a small optimization of the fix from the commit c605f3cdff53a743f6 ("usb: hub: take hub->hdev reference when processing from eventlist). We do not need to take the reference for each event. Instead we could get it when struct usb_hub is allocated and put it when it is released. By other words, we could handle it the same way as the reference for hub->intfdev. The motivation is that it will make the life easier when switching from khubd kthread to a workqueue. Suggested-by: Alan Stern Signed-off-by: Petr Mladek Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed