spi/pxa2xx: register driver properly
use platform_driver_register instead of platform_driver_probe. The latter only checks available devices at the time of calling. So if a device gets inserter at a later point in time then the driver will never play with it. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
This commit is contained in:
parent
3561d43fd2
commit
fbd29a14af
|
@ -1366,7 +1366,7 @@ static void cleanup(struct spi_device *spi)
|
||||||
kfree(chip);
|
kfree(chip);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init init_queue(struct driver_data *drv_data)
|
static int __devinit init_queue(struct driver_data *drv_data)
|
||||||
{
|
{
|
||||||
INIT_LIST_HEAD(&drv_data->queue);
|
INIT_LIST_HEAD(&drv_data->queue);
|
||||||
spin_lock_init(&drv_data->lock);
|
spin_lock_init(&drv_data->lock);
|
||||||
|
@ -1454,7 +1454,7 @@ static int destroy_queue(struct driver_data *drv_data)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init pxa2xx_spi_probe(struct platform_device *pdev)
|
static int __devinit pxa2xx_spi_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct pxa2xx_spi_master *platform_info;
|
struct pxa2xx_spi_master *platform_info;
|
||||||
|
@ -1723,13 +1723,14 @@ static struct platform_driver driver = {
|
||||||
.pm = &pxa2xx_spi_pm_ops,
|
.pm = &pxa2xx_spi_pm_ops,
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
|
.probe = pxa2xx_spi_probe,
|
||||||
.remove = pxa2xx_spi_remove,
|
.remove = pxa2xx_spi_remove,
|
||||||
.shutdown = pxa2xx_spi_shutdown,
|
.shutdown = pxa2xx_spi_shutdown,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init pxa2xx_spi_init(void)
|
static int __init pxa2xx_spi_init(void)
|
||||||
{
|
{
|
||||||
return platform_driver_probe(&driver, pxa2xx_spi_probe);
|
return platform_driver_register(&driver);
|
||||||
}
|
}
|
||||||
subsys_initcall(pxa2xx_spi_init);
|
subsys_initcall(pxa2xx_spi_init);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue