Commit d6634db8 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Haavard Skinnemoen

avr32: Use platform_driver_probe for pio platform driver

The probe function of the pio platform driver lives in the init section
and so a pio 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: default avatarUwe Kleine-König <ukleinek@strlen.de>
Signed-off-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
parent ece2678c
...@@ -401,7 +401,6 @@ static int __init pio_probe(struct platform_device *pdev) ...@@ -401,7 +401,6 @@ static int __init pio_probe(struct platform_device *pdev)
} }
static struct platform_driver pio_driver = { static struct platform_driver pio_driver = {
.probe = pio_probe,
.driver = { .driver = {
.name = "pio", .name = "pio",
}, },
...@@ -409,7 +408,7 @@ static struct platform_driver pio_driver = { ...@@ -409,7 +408,7 @@ static struct platform_driver pio_driver = {
static int __init pio_init(void) static int __init pio_init(void)
{ {
return platform_driver_register(&pio_driver); return platform_driver_probe(&pio_driver, pio_probe);
} }
postcore_initcall(pio_init); postcore_initcall(pio_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment