diff options
author | Mark Brown <broonie@kernel.org> | 2024-09-30 22:43:40 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-09-30 22:43:40 +0100 |
commit | 9e3dfbcf70c90f374dc66f54f978853dbb93efa8 (patch) | |
tree | 59b9fba51432da516d978810ee56a6d7351860b3 /drivers/spi | |
parent | b45938ed3691e0c9ccf3fac16bdbb14a52c3c597 (diff) | |
parent | 0809a9ccac4a2ffdfd1561bb551aec6099775545 (diff) | |
download | linux-9e3dfbcf70c90f374dc66f54f978853dbb93efa8.tar.gz linux-9e3dfbcf70c90f374dc66f54f978853dbb93efa8.tar.bz2 linux-9e3dfbcf70c90f374dc66f54f978853dbb93efa8.zip |
spi: replace and remove
Merge series from Yang Yingliang <yangyingliang@huaweicloud.com>:
Switch to use {devm_}spi_alloc_host/target() in drivers and remove
{devm_}spi_alloc_master/slave() in spi driver.
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-ch341.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi-slave-mt27xx.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi.c | 14 |
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/spi/spi-ch341.c b/drivers/spi/spi-ch341.c index d2351812d310..46bc208f2d05 100644 --- a/drivers/spi/spi-ch341.c +++ b/drivers/spi/spi-ch341.c @@ -152,7 +152,7 @@ static int ch341_probe(struct usb_interface *intf, if (ret) return ret; - ctrl = devm_spi_alloc_master(&udev->dev, sizeof(struct ch341_spi_dev)); + ctrl = devm_spi_alloc_host(&udev->dev, sizeof(struct ch341_spi_dev)); if (!ctrl) return -ENOMEM; diff --git a/drivers/spi/spi-slave-mt27xx.c b/drivers/spi/spi-slave-mt27xx.c index 9846f025dd4c..e331df967385 100644 --- a/drivers/spi/spi-slave-mt27xx.c +++ b/drivers/spi/spi-slave-mt27xx.c @@ -388,9 +388,9 @@ static int mtk_spi_slave_probe(struct platform_device *pdev) int irq, ret; const struct of_device_id *of_id; - ctlr = spi_alloc_slave(&pdev->dev, sizeof(*mdata)); + ctlr = spi_alloc_target(&pdev->dev, sizeof(*mdata)); if (!ctlr) { - dev_err(&pdev->dev, "failed to alloc spi slave\n"); + dev_err(&pdev->dev, "failed to alloc spi target\n"); return -ENOMEM; } diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index c1dad30a4528..073ffae97767 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3238,9 +3238,9 @@ static int spi_controller_id_alloc(struct spi_controller *ctlr, int start, int e } /** - * spi_register_controller - register SPI master or slave controller - * @ctlr: initialized master, originally from spi_alloc_master() or - * spi_alloc_slave() + * spi_register_controller - register SPI host or target controller + * @ctlr: initialized controller, originally from spi_alloc_host() or + * spi_alloc_target() * Context: can sleep * * SPI controllers connect to their drivers using some non-SPI bus, @@ -3390,11 +3390,11 @@ static void devm_spi_unregister(struct device *dev, void *res) } /** - * devm_spi_register_controller - register managed SPI master or slave + * devm_spi_register_controller - register managed SPI host or target * controller * @dev: device managing SPI controller - * @ctlr: initialized controller, originally from spi_alloc_master() or - * spi_alloc_slave() + * @ctlr: initialized controller, originally from spi_alloc_host() or + * spi_alloc_target() * Context: can sleep * * Register a SPI device as with spi_register_controller() which will @@ -3478,7 +3478,7 @@ void spi_unregister_controller(struct spi_controller *ctlr) /* * Release the last reference on the controller if its driver - * has not yet been converted to devm_spi_alloc_master/slave(). + * has not yet been converted to devm_spi_alloc_host/target(). */ if (!ctlr->devm_allocated) put_device(&ctlr->dev); |