summaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120-2.6/files/drivers/usb/host/adm5120-hcd.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2007-07-11 13:00:27 +0000
committerGabor Juhos <juhosg@openwrt.org>2007-07-11 13:00:27 +0000
commit4db7fa1c06f3c3681e6ae8aad75e4a1997445023 (patch)
tree258d226f6ffa46cc4ec4888a827f2399dcf16403 /target/linux/adm5120-2.6/files/drivers/usb/host/adm5120-hcd.c
parentbe6a41df04fe310ded95d38fa984a3226e47866e (diff)
downloadmaster-31e0f0ae-4db7fa1c06f3c3681e6ae8aad75e4a1997445023.tar.gz
master-31e0f0ae-4db7fa1c06f3c3681e6ae8aad75e4a1997445023.tar.bz2
master-31e0f0ae-4db7fa1c06f3c3681e6ae8aad75e4a1997445023.zip
refactor kernel code (part 1), mark it as broken now
SVN-Revision: 7916
Diffstat (limited to 'target/linux/adm5120-2.6/files/drivers/usb/host/adm5120-hcd.c')
-rw-r--r--target/linux/adm5120-2.6/files/drivers/usb/host/adm5120-hcd.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/target/linux/adm5120-2.6/files/drivers/usb/host/adm5120-hcd.c b/target/linux/adm5120-2.6/files/drivers/usb/host/adm5120-hcd.c
index 87bfcc6c72..c8be7393f7 100644
--- a/target/linux/adm5120-2.6/files/drivers/usb/host/adm5120-hcd.c
+++ b/target/linux/adm5120-2.6/files/drivers/usb/host/adm5120-hcd.c
@@ -18,6 +18,7 @@
#include <linux/usb.h>
#include <linux/platform_device.h>
+#include <asm/bootinfo.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/system.h>
@@ -751,7 +752,7 @@ static int __init adm5120hcd_probe(struct platform_device *pdev)
err = -ENOMEM;
goto out_mem;
}
-
+
hcd = usb_create_hcd(&adm5120_hc_driver, &pdev->dev, pdev->dev.bus_id);
if (!hcd)
goto out_mem;
@@ -821,22 +822,30 @@ static struct platform_driver adm5120hcd_driver = {
.probe = adm5120hcd_probe,
.remove = adm5120hcd_remove,
.driver = {
- .name = "adm5120-hcd",
+ .name = "adm5120-usbc",
.owner = THIS_MODULE,
},
};
static int __init adm5120hcd_init(void)
{
- if (usb_disabled())
+ int ret;
+
+ if (usb_disabled()) {
+ printk(KERN_DEBUG PFX "USB support is disabled\n");
return -ENODEV;
- if (!adm5120_board.has_usb) {
- printk(KERN_DEBUG PFX "this board does not have USB\n");
+ }
+
+ if (mips_machgroup != MACH_GROUP_ADM5120) {
+ printk(KERN_DEBUG PFX "unsupported machine group\n");
return -ENODEV;
}
- printk(KERN_INFO PFX "registered\n");
- return platform_driver_register(&adm5120hcd_driver);
+ ret = platform_driver_register(&adm5120hcd_driver);
+ if (ret == 0)
+ printk(KERN_INFO PFX "registered\n");
+
+ return ret;
}
static void __exit adm5120hcd_exit(void)