1 Fix spi-gpio for hotplug.
7 --- a/drivers/spi/spi_gpio.c
8 +++ b/drivers/spi/spi_gpio.c
9 @@ -213,7 +213,7 @@ static void spi_gpio_cleanup(struct spi_
10 spi_bitbang_cleanup(spi);
13 -static int __init spi_gpio_alloc(unsigned pin, const char *label, bool is_in)
14 +static int __devinit spi_gpio_alloc(unsigned pin, const char *label, bool is_in)
18 @@ -227,7 +227,7 @@ static int __init spi_gpio_alloc(unsigne
24 spi_gpio_request(struct spi_gpio_platform_data *pdata, const char *label)
27 @@ -256,7 +256,7 @@ done:
31 -static int __init spi_gpio_probe(struct platform_device *pdev)
32 +static int __devinit spi_gpio_probe(struct platform_device *pdev)
35 struct spi_master *master;
36 @@ -312,7 +312,7 @@ gpio_free:
40 -static int __exit spi_gpio_remove(struct platform_device *pdev)
41 +static int __devexit spi_gpio_remove(struct platform_device *pdev)
43 struct spi_gpio *spi_gpio;
44 struct spi_gpio_platform_data *pdata;
45 @@ -339,12 +339,13 @@ MODULE_ALIAS("platform:" DRIVER_NAME);
46 static struct platform_driver spi_gpio_driver = {
47 .driver.name = DRIVER_NAME,
48 .driver.owner = THIS_MODULE,
49 - .remove = __exit_p(spi_gpio_remove),
50 + .probe = spi_gpio_probe,
51 + .remove = __devexit_p(spi_gpio_remove),
54 static int __init spi_gpio_init(void)
56 - return platform_driver_probe(&spi_gpio_driver, spi_gpio_probe);
57 + return platform_driver_register(&spi_gpio_driver);
59 module_init(spi_gpio_init);