mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
treewide, spi: Get rid of SPI_MASTER_HALF_DUPLEX
The SPI_MASTER_HALF_DUPLEX is the legacy name of a definition for a half duplex flag. Since all others had been replaced with the respective SPI_CONTROLLER prefix get rid of the last one as well. There is no functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> # for input Acked-by: Paolo Abeni <pabeni@redhat.com> Link: https://lore.kernel.org/r/20231113111249.3982461-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
6f9da18171
commit
3fc6350fc8
@@ -375,7 +375,7 @@ static int rmi_spi_probe(struct spi_device *spi)
|
||||
struct rmi_device_platform_data *spi_pdata = spi->dev.platform_data;
|
||||
int error;
|
||||
|
||||
if (spi->master->flags & SPI_MASTER_HALF_DUPLEX)
|
||||
if (spi->master->flags & SPI_CONTROLLER_HALF_DUPLEX)
|
||||
return -EINVAL;
|
||||
|
||||
rmi_spi = devm_kzalloc(&spi->dev, sizeof(struct rmi_spi_xport),
|
||||
|
||||
@@ -1322,7 +1322,7 @@ static int mmc_spi_probe(struct spi_device *spi)
|
||||
/* We rely on full duplex transfers, mostly to reduce
|
||||
* per-transfer overheads (by making fewer transfers).
|
||||
*/
|
||||
if (spi->master->flags & SPI_MASTER_HALF_DUPLEX)
|
||||
if (spi->master->flags & SPI_CONTROLLER_HALF_DUPLEX)
|
||||
return -EINVAL;
|
||||
|
||||
/* MMC and SD specs only seem to care that sampling is on the
|
||||
|
||||
@@ -156,7 +156,7 @@ static void ks8851_rdreg(struct ks8851_net *ks, unsigned int op,
|
||||
|
||||
txb[0] = cpu_to_le16(op | KS_SPIOP_RD);
|
||||
|
||||
if (kss->spidev->master->flags & SPI_MASTER_HALF_DUPLEX) {
|
||||
if (kss->spidev->master->flags & SPI_CONTROLLER_HALF_DUPLEX) {
|
||||
msg = &kss->spi_msg2;
|
||||
xfer = kss->spi_xfer2;
|
||||
|
||||
@@ -180,7 +180,7 @@ static void ks8851_rdreg(struct ks8851_net *ks, unsigned int op,
|
||||
ret = spi_sync(kss->spidev, msg);
|
||||
if (ret < 0)
|
||||
netdev_err(ks->netdev, "read: spi_sync() failed\n");
|
||||
else if (kss->spidev->master->flags & SPI_MASTER_HALF_DUPLEX)
|
||||
else if (kss->spidev->master->flags & SPI_CONTROLLER_HALF_DUPLEX)
|
||||
memcpy(rxb, trx, rxl);
|
||||
else
|
||||
memcpy(rxb, trx + 2, rxl);
|
||||
|
||||
@@ -1201,7 +1201,7 @@ static int max3420_probe(struct spi_device *spi)
|
||||
int err, irq;
|
||||
u8 reg[8];
|
||||
|
||||
if (spi->master->flags & SPI_MASTER_HALF_DUPLEX) {
|
||||
if (spi->master->flags & SPI_CONTROLLER_HALF_DUPLEX) {
|
||||
dev_err(&spi->dev, "UDC needs full duplex to work\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1638,8 +1638,6 @@ spi_transfer_is_last(struct spi_controller *ctlr, struct spi_transfer *xfer)
|
||||
/* Compatibility layer */
|
||||
#define spi_master spi_controller
|
||||
|
||||
#define SPI_MASTER_HALF_DUPLEX SPI_CONTROLLER_HALF_DUPLEX
|
||||
|
||||
#define spi_master_get_devdata(_ctlr) spi_controller_get_devdata(_ctlr)
|
||||
#define spi_master_set_devdata(_ctlr, _data) \
|
||||
spi_controller_set_devdata(_ctlr, _data)
|
||||
|
||||
Reference in New Issue
Block a user