diff options
author | Uwe Kleine-König <ukleinek@strlen.de> | 2008-09-21 17:52:07 -0400 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-09-22 03:51:03 -0400 |
commit | d6634db8fe1784d0a8e4e156970fec034708446e (patch) | |
tree | d2010095f9b464458433d71a784c2a9bf411403b /arch | |
parent | ece2678c62ce13ef11a8b43526ccc5db8d711ed3 (diff) |
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: Uwe Kleine-König <ukleinek@strlen.de>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/avr32/mach-at32ap/pio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c index 90ef538ae547..ef2561e15399 100644 --- a/arch/avr32/mach-at32ap/pio.c +++ b/arch/avr32/mach-at32ap/pio.c | |||
@@ -401,7 +401,6 @@ static int __init pio_probe(struct platform_device *pdev) | |||
401 | } | 401 | } |
402 | 402 | ||
403 | static struct platform_driver pio_driver = { | 403 | static struct platform_driver pio_driver = { |
404 | .probe = pio_probe, | ||
405 | .driver = { | 404 | .driver = { |
406 | .name = "pio", | 405 | .name = "pio", |
407 | }, | 406 | }, |
@@ -409,7 +408,7 @@ static struct platform_driver pio_driver = { | |||
409 | 408 | ||
410 | static int __init pio_init(void) | 409 | static int __init pio_init(void) |
411 | { | 410 | { |
412 | return platform_driver_register(&pio_driver); | 411 | return platform_driver_probe(&pio_driver, pio_probe); |
413 | } | 412 | } |
414 | postcore_initcall(pio_init); | 413 | postcore_initcall(pio_init); |
415 | 414 | ||