aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-bcm63xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi-bcm63xx.c')
-rw-r--r--drivers/spi/spi-bcm63xx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 6e25ef1bce91..ea0aaa3f13d0 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -438,7 +438,7 @@ out:
438 438
439static int __devexit bcm63xx_spi_remove(struct platform_device *pdev) 439static int __devexit bcm63xx_spi_remove(struct platform_device *pdev)
440{ 440{
441 struct spi_master *master = platform_get_drvdata(pdev); 441 struct spi_master *master = spi_master_get(platform_get_drvdata(pdev));
442 struct bcm63xx_spi *bs = spi_master_get_devdata(master); 442 struct bcm63xx_spi *bs = spi_master_get_devdata(master);
443 443
444 spi_unregister_master(master); 444 spi_unregister_master(master);
@@ -452,6 +452,8 @@ static int __devexit bcm63xx_spi_remove(struct platform_device *pdev)
452 452
453 platform_set_drvdata(pdev, 0); 453 platform_set_drvdata(pdev, 0);
454 454
455 spi_master_put(master);
456
455 return 0; 457 return 0;
456} 458}
457 459