summaryrefslogtreecommitdiff
path: root/drivers/usb/core/message.c
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2010-11-15 23:56:54 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-17 01:02:00 +0300
commit63defa73c8c1193c1273474440c30d34c2524597 (patch)
tree3d7cbe9351e507ca2e55a874e496398979602ec1 /drivers/usb/core/message.c
parentf646cf94520e22cb11eb5d2e9a35b33bfe4bea1b (diff)
downloadlinux-63defa73c8c1193c1273474440c30d34c2524597.tar.xz
USB: use the no_callbacks flag for interfaces
Call pm_runtime_no_callbacks to set no_callbacks flag for USB interfaces. Since interfaces cannot be power-managed separately from their parent devices, there's no reason for the runtime-PM core to invoke any callbacks for them. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Reviewed-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/message.c')
-rw-r--r--drivers/usb/core/message.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index d6e3e410477e..f377e49fcb30 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -12,6 +12,7 @@
#include <linux/ctype.h>
#include <linux/nls.h>
#include <linux/device.h>
+#include <linux/pm_runtime.h>
#include <linux/scatterlist.h>
#include <linux/usb/quirks.h>
#include <linux/usb/hcd.h> /* for usbcore internals */
@@ -1804,6 +1805,7 @@ free_interfaces:
INIT_WORK(&intf->reset_ws, __usb_queue_reset_device);
intf->minor = -1;
device_initialize(&intf->dev);
+ pm_runtime_no_callbacks(&intf->dev);
dev_set_name(&intf->dev, "%d-%s:%d.%d",
dev->bus->busnum, dev->devpath,
configuration, alt->desc.bInterfaceNumber);