From a794161a39c36766ddabf7dd7bc556767c6987f8 Mon Sep 17 00:00:00 2001 From: Harini Jayaraman Date: Tue, 28 Jun 2011 11:25:22 -0600 Subject: [PATCH] spidev: Unregister SPI device on spidev exit The spidev module is not being removed cleanly since the SPI device is not being unregistered. Change-Id: I1f97163b3eef585b420a474cdd2aacc7657e6254 Signed-off-by: Harini Jayaraman Signed-off-by: David Brown --- drivers/spi/spidev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index f19253a22dfc..98dd4b560ca7 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -771,7 +771,7 @@ module_init(spidev_init); static void __exit spidev_exit(void) { if (spi) { - spi_dev_put(spi); + spi_unregister_device(spi); spi = NULL; } spi_unregister_driver(&spidev_spi_driver);