File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1351,7 +1351,7 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
1351
1351
goto out_dma_release ;
1352
1352
}
1353
1353
1354
- err = devm_spi_register_controller ( & pdev -> dev , ctlr );
1354
+ err = spi_register_controller ( ctlr );
1355
1355
if (err ) {
1356
1356
dev_err (& pdev -> dev , "could not register SPI controller: %d\n" ,
1357
1357
err );
@@ -1378,6 +1378,8 @@ static int bcm2835_spi_remove(struct platform_device *pdev)
1378
1378
1379
1379
bcm2835_debugfs_remove (bs );
1380
1380
1381
+ spi_unregister_controller (ctlr );
1382
+
1381
1383
/* Clear FIFOs, and disable the HW block */
1382
1384
bcm2835_wr (bs , BCM2835_SPI_CS ,
1383
1385
BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX );
Original file line number Diff line number Diff line change @@ -569,7 +569,7 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
569
569
goto out_clk_disable ;
570
570
}
571
571
572
- err = devm_spi_register_master ( & pdev -> dev , master );
572
+ err = spi_register_master ( master );
573
573
if (err ) {
574
574
dev_err (& pdev -> dev , "could not register SPI master: %d\n" , err );
575
575
goto out_clk_disable ;
@@ -593,6 +593,8 @@ static int bcm2835aux_spi_remove(struct platform_device *pdev)
593
593
594
594
bcm2835aux_debugfs_remove (bs );
595
595
596
+ spi_unregister_master (master );
597
+
596
598
bcm2835aux_spi_reset_hw (bs );
597
599
598
600
/* disable the HW block by releasing the clock */
Original file line number Diff line number Diff line change @@ -2761,6 +2761,8 @@ void spi_unregister_controller(struct spi_controller *ctlr)
2761
2761
struct spi_controller * found ;
2762
2762
int id = ctlr -> bus_num ;
2763
2763
2764
+ device_for_each_child (& ctlr -> dev , NULL , __unregister );
2765
+
2764
2766
/* First make sure that this controller was ever added */
2765
2767
mutex_lock (& board_lock );
2766
2768
found = idr_find (& spi_master_idr , id );
@@ -2773,7 +2775,6 @@ void spi_unregister_controller(struct spi_controller *ctlr)
2773
2775
list_del (& ctlr -> list );
2774
2776
mutex_unlock (& board_lock );
2775
2777
2776
- device_for_each_child (& ctlr -> dev , NULL , __unregister );
2777
2778
device_unregister (& ctlr -> dev );
2778
2779
/* free bus id */
2779
2780
mutex_lock (& board_lock );
You can’t perform that action at this time.
0 commit comments