From: Guenter Roeck Date: Fri, 17 Aug 2012 03:26:00 +0000 (-0700) Subject: spi/coldfire-qspi: Drop extra calls to spi_master_get in suspend/resume functions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=af36107968f1b5faab0e4a0cc44fa4498c63f017;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git spi/coldfire-qspi: Drop extra calls to spi_master_get in suspend/resume functions 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 Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c index 1a30b47465cb..764bfee75920 100644 --- a/drivers/spi/spi-coldfire-qspi.c +++ b/drivers/spi/spi-coldfire-qspi.c @@ -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);