diff options
| author | Takashi Iwai <tiwai@suse.de> | 2009-12-25 08:15:31 -0500 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2009-12-25 08:15:31 -0500 |
| commit | 52e04ea89da57274f0313d2bd73ba02f686cfdeb (patch) | |
| tree | 6ce5d086bcaea4cb534b3fcf6ba736eb48d582a4 /drivers/spi/spidev.c | |
| parent | 41116e926cb92292fa4fcbe888ae8133fa0038e6 (diff) | |
| parent | 8b90ca08821fee79e181bfcbc3bbd41ef5637136 (diff) | |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'drivers/spi/spidev.c')
| -rw-r--r-- | drivers/spi/spidev.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 9c446e6003d5..ea1bec3c9a13 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | #define SPIDEV_MAJOR 153 /* assigned */ | 53 | #define SPIDEV_MAJOR 153 /* assigned */ |
| 54 | #define N_SPI_MINORS 32 /* ... up to 256 */ | 54 | #define N_SPI_MINORS 32 /* ... up to 256 */ |
| 55 | 55 | ||
| 56 | static unsigned long minors[N_SPI_MINORS / BITS_PER_LONG]; | 56 | static DECLARE_BITMAP(minors, N_SPI_MINORS); |
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | /* Bit masks for spi_device.mode management. Note that incorrect | 59 | /* Bit masks for spi_device.mode management. Note that incorrect |
| @@ -558,7 +558,7 @@ static struct class *spidev_class; | |||
| 558 | 558 | ||
| 559 | /*-------------------------------------------------------------------------*/ | 559 | /*-------------------------------------------------------------------------*/ |
| 560 | 560 | ||
| 561 | static int spidev_probe(struct spi_device *spi) | 561 | static int __devinit spidev_probe(struct spi_device *spi) |
| 562 | { | 562 | { |
| 563 | struct spidev_data *spidev; | 563 | struct spidev_data *spidev; |
| 564 | int status; | 564 | int status; |
| @@ -607,7 +607,7 @@ static int spidev_probe(struct spi_device *spi) | |||
| 607 | return status; | 607 | return status; |
| 608 | } | 608 | } |
| 609 | 609 | ||
| 610 | static int spidev_remove(struct spi_device *spi) | 610 | static int __devexit spidev_remove(struct spi_device *spi) |
| 611 | { | 611 | { |
| 612 | struct spidev_data *spidev = spi_get_drvdata(spi); | 612 | struct spidev_data *spidev = spi_get_drvdata(spi); |
| 613 | 613 | ||
| @@ -629,7 +629,7 @@ static int spidev_remove(struct spi_device *spi) | |||
| 629 | return 0; | 629 | return 0; |
| 630 | } | 630 | } |
| 631 | 631 | ||
| 632 | static struct spi_driver spidev_spi = { | 632 | static struct spi_driver spidev_spi_driver = { |
| 633 | .driver = { | 633 | .driver = { |
| 634 | .name = "spidev", | 634 | .name = "spidev", |
| 635 | .owner = THIS_MODULE, | 635 | .owner = THIS_MODULE, |
| @@ -661,14 +661,14 @@ static int __init spidev_init(void) | |||
| 661 | 661 | ||
| 662 | spidev_class = class_create(THIS_MODULE, "spidev"); | 662 | spidev_class = class_create(THIS_MODULE, "spidev"); |
| 663 | if (IS_ERR(spidev_class)) { | 663 | if (IS_ERR(spidev_class)) { |
| 664 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); | 664 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name); |
| 665 | return PTR_ERR(spidev_class); | 665 | return PTR_ERR(spidev_class); |
| 666 | } | 666 | } |
| 667 | 667 | ||
| 668 | status = spi_register_driver(&spidev_spi); | 668 | status = spi_register_driver(&spidev_spi_driver); |
| 669 | if (status < 0) { | 669 | if (status < 0) { |
| 670 | class_destroy(spidev_class); | 670 | class_destroy(spidev_class); |
| 671 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); | 671 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name); |
| 672 | } | 672 | } |
| 673 | return status; | 673 | return status; |
| 674 | } | 674 | } |
| @@ -676,9 +676,9 @@ module_init(spidev_init); | |||
| 676 | 676 | ||
| 677 | static void __exit spidev_exit(void) | 677 | static void __exit spidev_exit(void) |
| 678 | { | 678 | { |
| 679 | spi_unregister_driver(&spidev_spi); | 679 | spi_unregister_driver(&spidev_spi_driver); |
| 680 | class_destroy(spidev_class); | 680 | class_destroy(spidev_class); |
| 681 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); | 681 | unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name); |
| 682 | } | 682 | } |
| 683 | module_exit(spidev_exit); | 683 | module_exit(spidev_exit); |
| 684 | 684 | ||
