Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: mgb4: Follow renaming of SPI "master" to "controller"

In commit 8caab75fd2c2 ("spi: Generalize SPI "master" to "controller"")
some functions and struct members were renamed. To not break all drivers
compatibility macros were provided.

To be able to remove these compatibility macros push the renaming into
this driver.

Reviewed-by: Martin Tůma <martin.tuma@digiteqautomotive.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/ccad7ad4176265bf90af92add18a0242652f5a84.1707324794.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Uwe Kleine-König and committed by
Mark Brown
2c2f93fb 1245633c

+7 -7
+7 -7
drivers/media/pci/mgb4/mgb4_core.c
··· 144 144 return to_spi_device(dev) ? 1 : 0; 145 145 } 146 146 147 - static struct spi_master *get_spi_adap(struct platform_device *pdev) 147 + static struct spi_controller *get_spi_adap(struct platform_device *pdev) 148 148 { 149 149 struct device *dev; 150 150 ··· 152 152 dev = device_find_child(&pdev->dev, NULL, match_spi_adap); 153 153 mutex_unlock(&pdev->dev.mutex); 154 154 155 - return dev ? container_of(dev, struct spi_master, dev) : NULL; 155 + return dev ? container_of(dev, struct spi_controller, dev) : NULL; 156 156 } 157 157 158 158 static int init_spi(struct mgb4_dev *mgbdev, u32 devid) ··· 179 179 }; 180 180 struct pci_dev *pdev = mgbdev->pdev; 181 181 struct device *dev = &pdev->dev; 182 - struct spi_master *master; 182 + struct spi_controller *ctlr; 183 183 struct spi_device *spi_dev; 184 184 u32 irq; 185 185 int rv, id; ··· 207 207 return PTR_ERR(mgbdev->spi_pdev); 208 208 } 209 209 210 - master = get_spi_adap(mgbdev->spi_pdev); 211 - if (!master) { 210 + ctlr = get_spi_adap(mgbdev->spi_pdev); 211 + if (!ctlr) { 212 212 dev_err(dev, "failed to get SPI adapter\n"); 213 213 rv = -EINVAL; 214 214 goto err_pdev; ··· 242 242 243 243 spi_info.platform_data = &mgbdev->flash_data; 244 244 245 - spi_dev = spi_new_device(master, &spi_info); 246 - put_device(&master->dev); 245 + spi_dev = spi_new_device(ctlr, &spi_info); 246 + put_device(&ctlr->dev); 247 247 if (!spi_dev) { 248 248 dev_err(dev, "failed to create MTD device\n"); 249 249 rv = -EINVAL;