1 Fix spi-gpio for hotplug.
7 Index: linux-2.6.28.2/drivers/spi/spi_gpio.c
8 ===================================================================
9 --- linux-2.6.28.2.orig/drivers/spi/spi_gpio.c 2009-02-11 17:58:42.000000000 +0100
10 +++ linux-2.6.28.2/drivers/spi/spi_gpio.c 2009-02-11 18:48:23.000000000 +0100
11 @@ -213,7 +213,7 @@ static void spi_gpio_cleanup(struct spi_
12 spi_bitbang_cleanup(spi);
15 -static int __init spi_gpio_alloc(unsigned pin, const char *label, bool is_in)
16 +static int __devinit spi_gpio_alloc(unsigned pin, const char *label, bool is_in)
20 @@ -227,7 +227,7 @@ static int __init spi_gpio_alloc(unsigne
26 spi_gpio_request(struct spi_gpio_platform_data *pdata, const char *label)
29 @@ -256,7 +256,7 @@ done:
33 -static int __init spi_gpio_probe(struct platform_device *pdev)
34 +static int __devinit spi_gpio_probe(struct platform_device *pdev)
37 struct spi_master *master;
38 @@ -312,7 +312,7 @@ gpio_free:
42 -static int __exit spi_gpio_remove(struct platform_device *pdev)
43 +static int __devexit spi_gpio_remove(struct platform_device *pdev)
45 struct spi_gpio *spi_gpio;
46 struct spi_gpio_platform_data *pdata;
47 @@ -339,12 +339,13 @@ MODULE_ALIAS("platform:" DRIVER_NAME);
48 static struct platform_driver spi_gpio_driver = {
49 .driver.name = DRIVER_NAME,
50 .driver.owner = THIS_MODULE,
51 - .remove = __exit_p(spi_gpio_remove),
52 + .probe = spi_gpio_probe,
53 + .remove = __devexit_p(spi_gpio_remove),
56 static int __init spi_gpio_init(void)
58 - return platform_driver_probe(&spi_gpio_driver, spi_gpio_probe);
59 + return platform_driver_register(&spi_gpio_driver);
61 module_init(spi_gpio_init);