提交 787928e7 编写于 作者: U Uwe Kleine-König 提交者: Haavard Skinnemoen

avr32: Use platform_driver_probe for pdc platform driver

The probe function of the pdc platform driver lives in the init section
and so a pdc device that is created after the init section is discarded
probably results in an oops.  Even if this cannot happen, using
platform_driver_probe is cleaner.  (If this can happen and should be
supported the probe function must live in the devinit section instead.)
Signed-off-by: NUwe Kleine-König <ukleinek@strlen.de>
Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
上级 d6634db8
......@@ -35,7 +35,6 @@ static int __init pdc_probe(struct platform_device *pdev)
}
static struct platform_driver pdc_driver = {
.probe = pdc_probe,
.driver = {
.name = "pdc",
},
......@@ -43,6 +42,6 @@ static struct platform_driver pdc_driver = {
static int __init pdc_init(void)
{
return platform_driver_register(&pdc_driver);
return platform_driver_probe(&pdc_driver, pdc_probe);
}
arch_initcall(pdc_init);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册