From 2631add3701e1de5d46da7ee5ec8b20ecf291395 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Wed, 10 Mar 2010 15:20:22 +0800 Subject: ENGR00121497-1 MX28 USB 100mA current draw Add USB 100mA limitation feature for mx28 to mach usb 2.0 current requirment Signed-off-by: Frank Li Signed-off-by: Alejandro Gonzalez --- drivers/usb/gadget/file_storage.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 376ee18b1def..2843fd5b86da 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -369,7 +369,11 @@ static struct { } mod_data = { // Default values .transport_parm = "BBB", .protocol_parm = "SCSI", +#ifdef CONFIG_MXS_VBUS_CURRENT_DRAW + .removable = 1, +#else .removable = 0, +#endif .can_stall = 1, .cdrom = 0, .vendor = DRIVER_VENDOR_ID, @@ -4292,7 +4296,6 @@ static int __init fsg_init(void) { int rc; struct fsg_dev *fsg; - if ((rc = fsg_alloc()) != 0) return rc; fsg = the_fsg; @@ -4300,8 +4303,12 @@ static int __init fsg_init(void) kref_put(&fsg->ref, fsg_release); return rc; } -module_init(fsg_init); +#ifdef CONFIG_MXS_VBUS_CURRENT_DRAW + fs_initcall(fsg_init); +#else + module_init(fsg_init); +#endif static void __exit fsg_cleanup(void) { -- cgit v1.2.3