]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
avr32: Use platform_driver_probe for pdc platform driver
authorUwe Kleine-König <ukleinek@strlen.de>
Sun, 21 Sep 2008 21:52:08 +0000 (23:52 +0200)
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Mon, 22 Sep 2008 07:51:03 +0000 (09:51 +0200)
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: Uwe Kleine-König <ukleinek@strlen.de>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
arch/avr32/mach-at32ap/pdc.c

index 1040bda4fda7c843ea0d4955129f17cc94ab79bd..61ab15aae97008e798f5b89d6a225d195ca1b578 100644 (file)
@@ -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);