Skip to content

Commit

Permalink
avr32: Use platform_driver_probe for pio platform driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König authored and Haavard Skinnemoen committed Sep 22, 2008
1 parent ece2678 commit d6634db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/avr32/mach-at32ap/pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,14 @@ static int __init pio_probe(struct platform_device *pdev)
}

static struct platform_driver pio_driver = {
.probe = pio_probe,
.driver = {
.name = "pio",
},
};

static int __init pio_init(void)
{
return platform_driver_register(&pio_driver);
return platform_driver_probe(&pio_driver, pio_probe);
}
postcore_initcall(pio_init);

Expand Down

0 comments on commit d6634db

Please sign in to comment.