当前位置: 技术问答>linux和unix
ohci host 模块加载问题
来源: 互联网 发布时间:2016-07-30
本文导语: 请教下, 我编译的ohci host driver 模块,insmod后没跑到probe,只能打印ohci_hcd_s3c2440_init的"ohci s3c2440 driver register!",能否指点下方向吗? 模块是照抄linux的,如下, int usb_hcd_s3c2440_probe(const struct hc_driver *driver, struct...
请教下,
我编译的ohci host driver 模块,insmod后没跑到probe,只能打印ohci_hcd_s3c2440_init的"ohci s3c2440 driver register!",能否指点下方向吗?
模块是照抄linux的,如下,
int usb_hcd_s3c2440_probe(const struct hc_driver *driver,
struct platform_device *dev)
{
printk(KERN_INFO "ohci_hcd_s3c2440_proben");
......
......
}
static int ohci_hcd_s3c2440_drv_probe(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
printk(KERN_INFO "ohci_hcd_s3c2440_drv_probe!n");
return usb_hcd_s3c2440_probe(&ohci_s3c2440_hc_driver, pdev);
}
static struct device_driver ohci_hcd_s3c2440_driver={
.name ="s3c2440-ohci",
.bus =&platform_bus_type,
.probe =ohci_hcd_s3c2440_drv_probe,
.remove =ohci_hcd_s3c2440_drv_remove,
};
static int __init ohci_hcd_s3c2440_init(void)
{
printk(KERN_INFO "ohci s3c2440 driver register!n");
return driver_register(&ohci_hcd_s3c2440_driver);
}
static void __exit ohci_hcd_s3c2440_cleanup(void)
{
printk(KERN_INFO "ohci s3c2440 driver unregister!n");
driver_unregister(&ohci_hcd_s3c2440_driver);
}
module_init(ohci_hcd_s3c2440_init);
module_exit(ohci_hcd_s3c2440_cleanup);
我编译的ohci host driver 模块,insmod后没跑到probe,只能打印ohci_hcd_s3c2440_init的"ohci s3c2440 driver register!",能否指点下方向吗?
模块是照抄linux的,如下,
int usb_hcd_s3c2440_probe(const struct hc_driver *driver,
struct platform_device *dev)
{
printk(KERN_INFO "ohci_hcd_s3c2440_proben");
......
......
}
static int ohci_hcd_s3c2440_drv_probe(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
printk(KERN_INFO "ohci_hcd_s3c2440_drv_probe!n");
return usb_hcd_s3c2440_probe(&ohci_s3c2440_hc_driver, pdev);
}
static struct device_driver ohci_hcd_s3c2440_driver={
.name ="s3c2440-ohci",
.bus =&platform_bus_type,
.probe =ohci_hcd_s3c2440_drv_probe,
.remove =ohci_hcd_s3c2440_drv_remove,
};
static int __init ohci_hcd_s3c2440_init(void)
{
printk(KERN_INFO "ohci s3c2440 driver register!n");
return driver_register(&ohci_hcd_s3c2440_driver);
}
static void __exit ohci_hcd_s3c2440_cleanup(void)
{
printk(KERN_INFO "ohci s3c2440 driver unregister!n");
driver_unregister(&ohci_hcd_s3c2440_driver);
}
module_init(ohci_hcd_s3c2440_init);
module_exit(ohci_hcd_s3c2440_cleanup);
|
恭喜楼主
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。