aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBen Dooks <[email protected]>2007-02-12 00:52:43 -0800
committerLinus Torvalds <[email protected]>2007-02-12 09:48:31 -0800
commitddc1e9753106cedcca7944d2b068baa2e14640b1 (patch)
tree6482b83f8f8bf7b0bd017c8101b47492fcd5e3ba /include/linux
parent14fd9b3f8a0a36e706d144efcd579805a99de594 (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 <[email protected]> Signed-off-by: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/spi/spi.h6
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);
static inline void spi_unregister_driver(struct spi_driver *sdrv)
{
- if (!sdrv)
- return;
- driver_unregister(&sdrv->driver);
+ if (sdrv)
+ driver_unregister(&sdrv->driver);
}
-
/**
* struct spi_master - interface to SPI master controller
* @cdev: class interface to this driver