video: fbdev: mmp: Follow renaming of SPI "master" to "controller"

In commit 8caab75fd2 ("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.

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/136f59b6e272e5ff7ec210627c9c3ea27d066d51.1707324794.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Uwe Kleine-König 2024-02-07 19:40:42 +01:00 committed by Mark Brown
parent 8c716f4a3d
commit b23031e730
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -32,7 +32,7 @@ static inline int lcd_spi_write(struct spi_device *spi, u32 data)
int timeout = 100000, isr, ret = 0;
u32 tmp;
void __iomem *reg_base = (void __iomem *)
*(void **)spi_master_get_devdata(spi->master);
*(void **) spi_controller_get_devdata(spi->controller);
/* clear ISR */
writel_relaxed(~SPI_IRQ_MASK, reg_base + SPU_IRQ_ISR);
@ -81,7 +81,7 @@ static inline int lcd_spi_write(struct spi_device *spi, u32 data)
static int lcd_spi_setup(struct spi_device *spi)
{
void __iomem *reg_base = (void __iomem *)
*(void **)spi_master_get_devdata(spi->master);
*(void **) spi_controller_get_devdata(spi->controller);
u32 tmp;
tmp = CFG_SCLKCNT(16) |
@ -136,32 +136,32 @@ static int lcd_spi_one_transfer(struct spi_device *spi, struct spi_message *m)
int lcd_spi_register(struct mmphw_ctrl *ctrl)
{
struct spi_master *master;
struct spi_controller *ctlr;
void **p_regbase;
int err;
master = spi_alloc_master(ctrl->dev, sizeof(void *));
if (!master) {
ctlr = spi_alloc_master(ctrl->dev, sizeof(void *));
if (!ctlr) {
dev_err(ctrl->dev, "unable to allocate SPI master\n");
return -ENOMEM;
}
p_regbase = spi_master_get_devdata(master);
p_regbase = spi_controller_get_devdata(ctlr);
*p_regbase = (void __force *)ctrl->reg_base;
/* set bus num to 5 to avoid conflict with other spi hosts */
master->bus_num = 5;
master->num_chipselect = 1;
master->setup = lcd_spi_setup;
master->transfer = lcd_spi_one_transfer;
ctlr->bus_num = 5;
ctlr->num_chipselect = 1;
ctlr->setup = lcd_spi_setup;
ctlr->transfer = lcd_spi_one_transfer;
err = spi_register_master(master);
err = spi_register_controller(ctlr);
if (err < 0) {
dev_err(ctrl->dev, "unable to register SPI master\n");
spi_master_put(master);
spi_controller_put(ctlr);
return err;
}
dev_info(&master->dev, "registered\n");
dev_info(&ctlr->dev, "registered\n");
return 0;
}