Commit f9977bb1 authored by Yang Yingliang's avatar Yang Yingliang Committed by Mark Brown

spi: mchp-pci1xxxx: switch to use modern name

Change legacy name master to modern name host or controller.

No functional changed.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230818093154.1183529-3-yangyingliang@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 08e6c503
...@@ -65,7 +65,7 @@ struct pci1xxxx_spi_internal { ...@@ -65,7 +65,7 @@ struct pci1xxxx_spi_internal {
bool spi_xfer_in_progress; bool spi_xfer_in_progress;
int irq; int irq;
struct completion spi_xfer_done; struct completion spi_xfer_done;
struct spi_master *spi_host; struct spi_controller *spi_host;
struct pci1xxxx_spi *parent; struct pci1xxxx_spi *parent;
struct { struct {
unsigned int dev_sel : 3; unsigned int dev_sel : 3;
...@@ -250,7 +250,7 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id * ...@@ -250,7 +250,7 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id *
struct pci1xxxx_spi_internal *spi_sub_ptr; struct pci1xxxx_spi_internal *spi_sub_ptr;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct pci1xxxx_spi *spi_bus; struct pci1xxxx_spi *spi_bus;
struct spi_master *spi_host; struct spi_controller *spi_host;
u32 regval; u32 regval;
int ret; int ret;
...@@ -276,7 +276,7 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id * ...@@ -276,7 +276,7 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id *
sizeof(struct pci1xxxx_spi_internal), sizeof(struct pci1xxxx_spi_internal),
GFP_KERNEL); GFP_KERNEL);
spi_sub_ptr = spi_bus->spi_int[iter]; spi_sub_ptr = spi_bus->spi_int[iter];
spi_sub_ptr->spi_host = devm_spi_alloc_master(dev, sizeof(struct spi_master)); spi_sub_ptr->spi_host = devm_spi_alloc_host(dev, sizeof(struct spi_controller));
if (!spi_sub_ptr->spi_host) if (!spi_sub_ptr->spi_host)
return -ENOMEM; return -ENOMEM;
...@@ -366,8 +366,8 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id * ...@@ -366,8 +366,8 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id *
spi_host->max_speed_hz = PCI1XXXX_SPI_MAX_CLOCK_HZ; spi_host->max_speed_hz = PCI1XXXX_SPI_MAX_CLOCK_HZ;
spi_host->min_speed_hz = PCI1XXXX_SPI_MIN_CLOCK_HZ; spi_host->min_speed_hz = PCI1XXXX_SPI_MIN_CLOCK_HZ;
spi_host->flags = SPI_CONTROLLER_MUST_TX; spi_host->flags = SPI_CONTROLLER_MUST_TX;
spi_master_set_devdata(spi_host, spi_sub_ptr); spi_controller_set_devdata(spi_host, spi_sub_ptr);
ret = devm_spi_register_master(dev, spi_host); ret = devm_spi_register_controller(dev, spi_host);
if (ret) if (ret)
goto error; goto error;
} }
...@@ -415,7 +415,7 @@ static int pci1xxxx_spi_resume(struct device *dev) ...@@ -415,7 +415,7 @@ static int pci1xxxx_spi_resume(struct device *dev)
for (iter = 0; iter < spi_ptr->total_hw_instances; iter++) { for (iter = 0; iter < spi_ptr->total_hw_instances; iter++) {
spi_sub_ptr = spi_ptr->spi_int[iter]; spi_sub_ptr = spi_ptr->spi_int[iter];
spi_master_resume(spi_sub_ptr->spi_host); spi_controller_resume(spi_sub_ptr->spi_host);
writel(regval, spi_ptr->reg_base + writel(regval, spi_ptr->reg_base +
SPI_MST_EVENT_MASK_REG_OFFSET(iter)); SPI_MST_EVENT_MASK_REG_OFFSET(iter));
...@@ -441,7 +441,7 @@ static int pci1xxxx_spi_suspend(struct device *dev) ...@@ -441,7 +441,7 @@ static int pci1xxxx_spi_suspend(struct device *dev)
/* Store existing config before suspend */ /* Store existing config before suspend */
store_restore_config(spi_ptr, spi_sub_ptr, iter, 1); store_restore_config(spi_ptr, spi_sub_ptr, iter, 1);
spi_master_suspend(spi_sub_ptr->spi_host); spi_controller_suspend(spi_sub_ptr->spi_host);
writel(reg1, spi_ptr->reg_base + writel(reg1, spi_ptr->reg_base +
SPI_MST_EVENT_MASK_REG_OFFSET(iter)); SPI_MST_EVENT_MASK_REG_OFFSET(iter));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment