Merge remote-tracking branches 'spi/fix/idr' and 'spi/fix/sh-msiof' into spi-linus
This commit is contained in:
@@ -900,7 +900,7 @@ static int sh_msiof_transfer_one(struct spi_master *master,
|
|||||||
break;
|
break;
|
||||||
copy32 = copy_bswap32;
|
copy32 = copy_bswap32;
|
||||||
} else if (bits <= 16) {
|
} else if (bits <= 16) {
|
||||||
if (l & 1)
|
if (l & 3)
|
||||||
break;
|
break;
|
||||||
copy32 = copy_wswap32;
|
copy32 = copy_wswap32;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -2245,11 +2245,12 @@ static int __unregister(struct device *dev, void *null)
|
|||||||
void spi_unregister_controller(struct spi_controller *ctlr)
|
void spi_unregister_controller(struct spi_controller *ctlr)
|
||||||
{
|
{
|
||||||
struct spi_controller *found;
|
struct spi_controller *found;
|
||||||
|
int id = ctlr->bus_num;
|
||||||
int dummy;
|
int dummy;
|
||||||
|
|
||||||
/* First make sure that this controller was ever added */
|
/* First make sure that this controller was ever added */
|
||||||
mutex_lock(&board_lock);
|
mutex_lock(&board_lock);
|
||||||
found = idr_find(&spi_master_idr, ctlr->bus_num);
|
found = idr_find(&spi_master_idr, id);
|
||||||
mutex_unlock(&board_lock);
|
mutex_unlock(&board_lock);
|
||||||
if (found != ctlr) {
|
if (found != ctlr) {
|
||||||
dev_dbg(&ctlr->dev,
|
dev_dbg(&ctlr->dev,
|
||||||
@@ -2269,7 +2270,7 @@ void spi_unregister_controller(struct spi_controller *ctlr)
|
|||||||
device_unregister(&ctlr->dev);
|
device_unregister(&ctlr->dev);
|
||||||
/* free bus id */
|
/* free bus id */
|
||||||
mutex_lock(&board_lock);
|
mutex_lock(&board_lock);
|
||||||
idr_remove(&spi_master_idr, ctlr->bus_num);
|
idr_remove(&spi_master_idr, id);
|
||||||
mutex_unlock(&board_lock);
|
mutex_unlock(&board_lock);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(spi_unregister_controller);
|
EXPORT_SYMBOL_GPL(spi_unregister_controller);
|
||||||
|
|||||||
Reference in New Issue
Block a user