[PATCH] Make s3c2410 gadget initialize with no debugfs.
andrzej zaborowski
balrogg at gmail.com
Sat Sep 27 18:14:43 CEST 2008
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 <balrog at zabor.org>
---
drivers/usb/gadget/composite.c | 4 ++++
drivers/usb/gadget/s3c2410_udc.c | 7 +++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 85c876c..6e7b9c1 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -981,7 +981,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 e93b9a6..6c5f0eb 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,
@@ -1903,6 +1907,7 @@ static int s3c2410_udc_probe(struct platform_device *pdev)
udc->regs_info = NULL;
}
}
+#endif
dev_dbg(dev, "probe ok\n");
@@ -2009,12 +2014,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)
--
1.5.3.4
More information about the openmoko-kernel
mailing list