diff options
| author | Ben Dooks <ben@fluff.org> | 2007-02-12 03:52:43 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:31 -0500 |
| commit | ddc1e9753106cedcca7944d2b068baa2e14640b1 (patch) | |
| tree | 6482b83f8f8bf7b0bd017c8101b47492fcd5e3ba /include/linux | |
| parent | 14fd9b3f8a0a36e706d144efcd579805a99de594 (diff) | |
[PATCH] spi: remove return in spi_unregister_driver()
Make the spi_unregister_driver() code fit in with the rest of the header
file, and only do the action if the driver passed is non-NULL.
This also makes the code a line smaller.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/spi/spi.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index e25fcae89d3b..851b25d6e82b 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -148,13 +148,11 @@ extern int spi_register_driver(struct spi_driver *sdrv); | |||
| 148 | 148 | ||
| 149 | static inline void spi_unregister_driver(struct spi_driver *sdrv) | 149 | static inline void spi_unregister_driver(struct spi_driver *sdrv) |
| 150 | { | 150 | { |
| 151 | if (!sdrv) | 151 | if (sdrv) |
| 152 | return; | 152 | driver_unregister(&sdrv->driver); |
| 153 | driver_unregister(&sdrv->driver); | ||
| 154 | } | 153 | } |
| 155 | 154 | ||
| 156 | 155 | ||
| 157 | |||
| 158 | /** | 156 | /** |
| 159 | * struct spi_master - interface to SPI master controller | 157 | * struct spi_master - interface to SPI master controller |
| 160 | * @cdev: class interface to this driver | 158 | * @cdev: class interface to this driver |
