From 563c3d38b21d913f695d0d35c265a12348ea9f1f Mon Sep 17 00:00:00 2001 From: Andrzej Zaborowski Date: Wed, 19 Nov 2008 17:10:53 +0000 Subject: Make-s3c2410-gadget-initialize-with-no-debugfs I needed the following two changes for g_ether to work with last week's stable-tracking and no CONFIG_DEBUG_FS. I don't know if they're related to moko patches, if not I can send them upstream isntead. BTW I need to boot off the SD card now because mtd only returns CRC errors and doesn't mount. Does it work for other people? Signed-off-by: Andrzej Zaborowski --- drivers/usb/gadget/composite.c | 4 ++++ drivers/usb/gadget/s3c2410_udc.c | 7 +++++++ 2 files changed, 11 insertions(+) (limited to 'drivers/usb') diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index f2da0269e1b..b13c47cf6b2 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1045,7 +1045,11 @@ composite_resume(struct usb_gadget *gadget) /*-------------------------------------------------------------------------*/ static struct usb_gadget_driver composite_driver = { +#ifdef CONFIG_USB_GADGET_DUALSPEED .speed = USB_SPEED_HIGH, +#else + .speed = USB_SPEED_FULL, +#endif .bind = composite_bind, .unbind = __exit_p(composite_unbind), diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index 65ba6129cf0..1b816251660 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c @@ -134,6 +134,8 @@ static int dprintk(int level, const char *fmt, ...) return 0; } #endif + +#ifdef CONFIG_USB_GADGET_DEBUG_FS static int s3c2410_udc_debugfs_seq_show(struct seq_file *m, void *p) { u32 addr_reg,pwr_reg,ep_int_reg,usb_int_reg; @@ -197,6 +199,7 @@ static const struct file_operations s3c2410_udc_debugfs_fops = { .release = single_release, .owner = THIS_MODULE, }; +#endif /* io macros */ @@ -1893,6 +1896,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev) udc->vbus = 1; } +#ifdef CONFIG_USB_GADGET_DEBUG_FS if (s3c2410_udc_debugfs_root) { udc->regs_info = debugfs_create_file("registers", S_IRUGO, s3c2410_udc_debugfs_root, @@ -1900,6 +1904,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev) if (!udc->regs_info) dev_warn(dev, "debugfs file creation failed\n"); } +#endif dev_dbg(dev, "probe ok\n"); @@ -2006,12 +2011,14 @@ static int __init udc_init(void) dprintk(DEBUG_NORMAL, "%s: version %s\n", gadget_name, DRIVER_VERSION); +#ifdef CONFIG_USB_GADGET_DEBUG_FS s3c2410_udc_debugfs_root = debugfs_create_dir(gadget_name, NULL); if (IS_ERR(s3c2410_udc_debugfs_root)) { printk(KERN_ERR "%s: debugfs dir creation failed %ld\n", gadget_name, PTR_ERR(s3c2410_udc_debugfs_root)); s3c2410_udc_debugfs_root = NULL; } +#endif retval = platform_driver_register(&udc_driver_2410); if (retval) -- cgit v1.2.3