diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-09 02:38:23 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-09 02:38:23 -0500 |
commit | da733563be5a9da26fe81d9f007262d00b846e22 (patch) | |
tree | db28291df94a2043af2123911984c5c173da4e6f /drivers/spi/spi-gpio.c | |
parent | 6ccbcf2cb41131f8d56ef0723bf3f7c1f8486076 (diff) | |
parent | dab78d7924598ea4031663dd10db814e2e324928 (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/spi/spi-gpio.c')
-rw-r--r-- | drivers/spi/spi-gpio.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index 0e88ab745490..e093d3ec41ba 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/module.h> | ||
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
@@ -311,7 +312,7 @@ done: | |||
311 | return value; | 312 | return value; |
312 | } | 313 | } |
313 | 314 | ||
314 | static int __init spi_gpio_probe(struct platform_device *pdev) | 315 | static int __devinit spi_gpio_probe(struct platform_device *pdev) |
315 | { | 316 | { |
316 | int status; | 317 | int status; |
317 | struct spi_master *master; | 318 | struct spi_master *master; |
@@ -379,7 +380,7 @@ gpio_free: | |||
379 | return status; | 380 | return status; |
380 | } | 381 | } |
381 | 382 | ||
382 | static int __exit spi_gpio_remove(struct platform_device *pdev) | 383 | static int __devexit spi_gpio_remove(struct platform_device *pdev) |
383 | { | 384 | { |
384 | struct spi_gpio *spi_gpio; | 385 | struct spi_gpio *spi_gpio; |
385 | struct spi_gpio_platform_data *pdata; | 386 | struct spi_gpio_platform_data *pdata; |
@@ -408,21 +409,10 @@ MODULE_ALIAS("platform:" DRIVER_NAME); | |||
408 | static struct platform_driver spi_gpio_driver = { | 409 | static struct platform_driver spi_gpio_driver = { |
409 | .driver.name = DRIVER_NAME, | 410 | .driver.name = DRIVER_NAME, |
410 | .driver.owner = THIS_MODULE, | 411 | .driver.owner = THIS_MODULE, |
411 | .remove = __exit_p(spi_gpio_remove), | 412 | .probe = spi_gpio_probe, |
413 | .remove = __devexit_p(spi_gpio_remove), | ||
412 | }; | 414 | }; |
413 | 415 | module_platform_driver(spi_gpio_driver); | |
414 | static int __init spi_gpio_init(void) | ||
415 | { | ||
416 | return platform_driver_probe(&spi_gpio_driver, spi_gpio_probe); | ||
417 | } | ||
418 | module_init(spi_gpio_init); | ||
419 | |||
420 | static void __exit spi_gpio_exit(void) | ||
421 | { | ||
422 | platform_driver_unregister(&spi_gpio_driver); | ||
423 | } | ||
424 | module_exit(spi_gpio_exit); | ||
425 | |||
426 | 416 | ||
427 | MODULE_DESCRIPTION("SPI master driver using generic bitbanged GPIO "); | 417 | MODULE_DESCRIPTION("SPI master driver using generic bitbanged GPIO "); |
428 | MODULE_AUTHOR("David Brownell"); | 418 | MODULE_AUTHOR("David Brownell"); |