Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ddc1e9753106cedcca7944d2b068baa2e14640b1
Commit:     ddc1e9753106cedcca7944d2b068baa2e14640b1
Parent:     14fd9b3f8a0a36e706d144efcd579805a99de594
Author:     Ben Dooks <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 12 00:52:43 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Feb 12 09:48:31 2007 -0800

    [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]>
---
 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 e25fcae..851b25d 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
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to