From: Andrew Morton Make it pretend to compile with CONFIG_PM=n. Cc: Alan Stern Cc: Greg KH Signed-off-by: Andrew Morton --- drivers/usb/core/usb.c | 2 +- include/linux/usb.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff -puN drivers/usb/core/usb.c~fix-gregkh-usb-usbcore-add-autosuspend-autoresume-infrastructure drivers/usb/core/usb.c --- a/drivers/usb/core/usb.c~fix-gregkh-usb-usbcore-add-autosuspend-autoresume-infrastructure +++ a/drivers/usb/core/usb.c @@ -272,8 +272,8 @@ usb_alloc_dev(struct usb_device *parent, dev->parent = parent; INIT_LIST_HEAD(&dev->filelist); -#ifdef CONFIG_PM mutex_init(&dev->pm_mutex); +#ifdef CONFIG_PM INIT_WORK(&dev->autosuspend, usb_autosuspend_work, dev); #endif return dev; diff -puN include/linux/usb.h~fix-gregkh-usb-usbcore-add-autosuspend-autoresume-infrastructure include/linux/usb.h --- a/include/linux/usb.h~fix-gregkh-usb-usbcore-add-autosuspend-autoresume-infrastructure +++ a/include/linux/usb.h @@ -381,10 +381,10 @@ struct usb_device { int maxchild; /* Number of ports if hub */ struct usb_device *children[USB_MAXCHILDREN]; -#ifdef CONFIG_PM - struct work_struct autosuspend; /* for delayed autosuspends */ struct mutex pm_mutex; /* protects PM operations */ int pm_usage_cnt; /* usage counter for autosuspend */ +#ifdef CONFIG_PM + struct work_struct autosuspend; /* for delayed autosuspends */ unsigned auto_pm:1; /* autosuspend/resume in progress */ unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ _