4,441
社区成员
发帖
与我相关
我的任务
分享
static struct platform_driver s3c_ide_driver = {
.probe = s3c_ide_probe,
.remove = s3c_ide_remove,
.driver = {
.name = "s3c-ide",
},
};
static int __init s3c_ide_init(void)
{
return platform_driver_register(&s3c_ide_driver);
}
int platform_driver_register(struct platform_driver *drv)
{
drv->driver.bus = &platform_bus_type;
if (drv->probe)
drv->driver.probe = platform_drv_probe;
if (drv->remove)
drv->driver.remove = platform_drv_remove;
if (drv->shutdown)
drv->driver.shutdown = platform_drv_shutdown;
if (drv->suspend)
drv->driver.suspend = platform_drv_suspend;
if (drv->resume)
drv->driver.resume = platform_drv_resume;
return driver_register(&drv->driver);
}
static int s3c_ide_probe (struct platform_device *pdev)
{
s3c_ide_hwif_t *s3c_hwif = &s3c_ide_hwif;
ide_hwif_t *hwif;
hw_regs_t *hw;
int ret = 0;
ulong reg;
。。。。
。。。。
}
if (drv->probe)
drv->driver.probe = platform_drv_probe;