[malta] add missing kernel config symbols
[openwrt.git] / target / linux / generic / patches-2.6.38 / 860-01_hotpluggable_spi_gpio.patch
1 Fix spi-gpio for hotplug.
2
3 --mb
4
5
6
7 --- a/drivers/spi/spi_gpio.c
8 +++ b/drivers/spi/spi_gpio.c
9 @@ -255,7 +255,7 @@ static void spi_gpio_cleanup(struct spi_
10 spi_bitbang_cleanup(spi);
11 }
12
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)
15 {
16 int value;
17
18 @@ -269,7 +269,7 @@ static int __init spi_gpio_alloc(unsigne
19 return value;
20 }
21
22 -static int __init
23 +static int __devinit
24 spi_gpio_request(struct spi_gpio_platform_data *pdata, const char *label,
25 u16 *res_flags)
26 {
27 @@ -311,7 +311,7 @@ done:
28 return value;
29 }
30
31 -static int __init spi_gpio_probe(struct platform_device *pdev)
32 +static int __devinit spi_gpio_probe(struct platform_device *pdev)
33 {
34 int status;
35 struct spi_master *master;
36 @@ -379,7 +379,7 @@ gpio_free:
37 return status;
38 }
39
40 -static int __exit spi_gpio_remove(struct platform_device *pdev)
41 +static int __devexit spi_gpio_remove(struct platform_device *pdev)
42 {
43 struct spi_gpio *spi_gpio;
44 struct spi_gpio_platform_data *pdata;
45 @@ -408,12 +408,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),
52 };
53
54 static int __init spi_gpio_init(void)
55 {
56 - return platform_driver_probe(&spi_gpio_driver, spi_gpio_probe);
57 + return platform_driver_register(&spi_gpio_driver);
58 }
59 module_init(spi_gpio_init);
60
This page took 0.042536 seconds and 5 git commands to generate.