spi/coldfire-qspi: Drop extra calls to spi_master_get in suspend/resume functions
authorGuenter Roeck <linux@roeck-us.net>
Fri, 17 Aug 2012 03:26:00 +0000 (20:26 -0700)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 17 Aug 2012 21:46:41 +0000 (22:46 +0100)
Suspend and resume functions call spi_master_get() without matching
spi_master_put(). The extra references are unnecessary and cause
subsequent module unload attempts to fail, so drop the calls.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/spi/spi-coldfire-qspi.c

index 1a30b47465cb6c1526680c55f069a2b4e2eb7f85..764bfee75920f1779aedf9a0bc78d3280fd2045d 100644 (file)
@@ -540,7 +540,7 @@ static int __devexit mcfqspi_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM_SLEEP
 static int mcfqspi_suspend(struct device *dev)
 {
-       struct spi_master *master = spi_master_get(dev_get_drvdata(dev));
+       struct spi_master *master = dev_get_drvdata(dev);
        struct mcfqspi *mcfqspi = spi_master_get_devdata(master);
 
        spi_master_suspend(master);
@@ -552,7 +552,7 @@ static int mcfqspi_suspend(struct device *dev)
 
 static int mcfqspi_resume(struct device *dev)
 {
-       struct spi_master *master = spi_master_get(dev_get_drvdata(dev));
+       struct spi_master *master = dev_get_drvdata(dev);
        struct mcfqspi *mcfqspi = spi_master_get_devdata(master);
 
        spi_master_resume(master);