Fixes autosuspend and auto_pm fields missing
Subsystems (2)
PATCH 1/1 Fixes autosuspend and auto_pm fields missing
This small patch changes omap_h3_1710_defconfig to fix the bug.
The catch is: for struct usb_device to have the fields struct work_struct autosuspend and unsigned autopm:1 CONFIG_PM should be set "y".
make uImage
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h CHK include/linux/compile.h CC drivers/usb/core/usb.o
drivers/usb/core/usb.c: In function 'usb_release_dev':drivers/usb/core/usb.c:177: error: 'struct usb_device' has no member named 'autosuspend' drivers/usb/core/usb.c: In function 'usb_autosuspend_work':drivers/usb/core/usb.c:218: error: 'struct usb_device' has no member named 'auto_pm' drivers/usb/core/usb.c:219: warning: statement with no effect
make[3]: *** [drivers/usb/core/usb.o] Error 1
make[2]: *** [drivers/usb/core] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2
Signature · 5 lines
Best Regards, Felipe Balbi [email protected] OSMRC - INdT
include/linux/usb.h +2 -2
@@ -381,13 +381,13 @@ struct usb_device {struct usb_device *children[USB_MAXCHILDREN ];int pm_usage_cnt;/* usage counter for autosuspend */ -#ifdef CONFIG_PM +/* #ifdef CONFIG_PM */ struct work_struct autosuspend;/* for delayed autosuspends */ struct mutex pm_mutex;/* protects PM operations */ unsigned auto_pm:1; /* autosuspend/resume in progress */ unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ -#endif +/* #endif */ };#define to_usb_device (d) container_of(d, struct usb_device, dev)
PATCH 1/1 Fixes autosuspend and auto_pm fields missing
Please forget about the other patch... this is the right one...
sorry guys
Quoted 22 lines · ext Felipe Balbi
This small patch changes
omap_h3_1710_defconfigto fix the bug.The catch is: for struct
usb_deviceto have the fields structwork_structautosuspend and unsigned autopm:1CONFIG_PMshould be set "y".make uImage
CHKinclude/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.CHK include/linux/utsrelease.h CHK include/linux/compile.h CC drivers/usb/core/usb.o
drivers/usb/core/usb.c: In function 'usb_release_dev':drivers/usb/core/usb.c:177: error: 'structusb_device' has no member named 'autosuspend'drivers/usb/core/usb.c: In function 'usb_autosuspend_work':drivers/usb/core/usb.c:218: error: 'structusb_device' has no member named 'auto_pm'drivers/usb/core/usb.c:219: warning: statement with no effect
make[3]: *** [drivers/usb/core/usb.o] Error 1
make[2]: *** [drivers/usb/core] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2
Signature · 5 lines
Best Regards, Felipe Balbi [email protected] OSMRC - INdT
arch/arm/configs/omap_h3_1710_defconfig +1 -1
@@ -223,7 +223,7 @@ CONFIG_BINFMT_AOUT=y # # Power management options # -# CONFIG_PM is not set +CONFIG_PM=y # # Networking
Hi David,
Quoted 7 lines · Felipe Balbi
CC
drivers/usb/core/usb.odrivers/usb/core/usb.c: In function 'usb_release_dev':drivers/usb/core/usb.c:177: error: 'structusb_device' has no member named 'autosuspend'drivers/usb/core/usb.c: In function 'usb_autosuspend_work':drivers/usb/core/usb.c:218: error: 'structusb_device' has no member named 'auto_pm'drivers/usb/core/usb.c:219: warning: statement with no effect
make[3]: *** [drivers/usb/core/usb.o] Error 1
do we have a mismatch here between usage of CONFIG_PM in include/linux/usb.h and CONFIG_USB_SUSPEND in usb/core/usb.c if CONFIG_PM isn't set for OMAP?
Cheers
Dirk
include/linux/usb.h:
#ifdef CONFIG_PM
struct work_struct autosuspend; /* for delayed autosuspends */
struct mutex pm_mutex; /* protects PM operations */
unsigned auto_pm:1; /* autosuspend/resume in progress */
unsigned do_remote_wakeup:1; /* remote wakeup should be
enabled */
#endif
usb/core/usb.c line ~177:
#ifdef CONFIG_USB_SUSPEND cancel_delayed_work(&udev->autosuspend);
...
#endif
usb/core/usb.c line ~218:
#ifdef CONFIG_USB_SUSPEND
...
udev->auto_pm = 1;
...
Quoted 3 lines · Dirk Behme
do we have a mismatch here between usage of
CONFIG_PMininclude/linux/usb.handCONFIG_USB_SUSPENDinusb/core/usb.cifCONFIG_PMisn't set for OMAP?
We have a case of patches not getting into the OMAP tree yet; I'm not sure if they've been merged into kernel.org yet.
Alan, this tree is at ~RC3 ... is this fix in the main kernel GIT tree yet, or just in MM?
- Dave