summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-02-08 20:19:18 +0000
committerMark Brown <broonie@kernel.org>2024-02-08 20:19:18 +0000
commit0da9a7e5c86b003a9b446b30c90eaf96b2e442c2 (patch)
tree635e28216dae3a2a91806df91c5a3962998aa891 /drivers/video
parent0f0212558bc9e33fad4148d3f44745a367076b20 (diff)
parent76b31eb4c2da3ddb3195cc14f6aad24908adf524 (diff)
downloadlinux-0da9a7e5c86b003a9b446b30c90eaf96b2e442c2.tar.gz
linux-0da9a7e5c86b003a9b446b30c90eaf96b2e442c2.tar.bz2
linux-0da9a7e5c86b003a9b446b30c90eaf96b2e442c2.zip
spi: get rid of some legacy macros
Merge series from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>: This series finishes off the removal of some of the legacy names for SPI controllers and devices.
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/core/fbcon.c3
-rw-r--r--drivers/video/fbdev/mmp/hw/mmp_spi.c26
-rw-r--r--drivers/video/fbdev/savage/savagefb_driver.c3
-rw-r--r--drivers/video/fbdev/sis/sis_main.c2
-rw-r--r--drivers/video/fbdev/stifb.c2
-rw-r--r--drivers/video/fbdev/vt8500lcdfb.c1
6 files changed, 20 insertions, 17 deletions
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 63af6ab034b5..1183e7a871f8 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -631,8 +631,7 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
if (logo_lines > vc->vc_bottom) {
logo_shown = FBCON_LOGO_CANSHOW;
- printk(KERN_INFO
- "fbcon_init: disable boot-logo (boot-logo bigger than screen).\n");
+ pr_info("fbcon: disable boot-logo (boot-logo bigger than screen).\n");
} else {
logo_shown = FBCON_LOGO_DRAW;
vc->vc_top = logo_lines;
diff --git a/drivers/video/fbdev/mmp/hw/mmp_spi.c b/drivers/video/fbdev/mmp/hw/mmp_spi.c
index 0f8f0312a7c4..cf23650d7f0b 100644
--- a/drivers/video/fbdev/mmp/hw/mmp_spi.c
+++ b/drivers/video/fbdev/mmp/hw/mmp_spi.c
@@ -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;
}
diff --git a/drivers/video/fbdev/savage/savagefb_driver.c b/drivers/video/fbdev/savage/savagefb_driver.c
index dddd6afcb972..ebc9aeffdde7 100644
--- a/drivers/video/fbdev/savage/savagefb_driver.c
+++ b/drivers/video/fbdev/savage/savagefb_driver.c
@@ -869,6 +869,9 @@ static int savagefb_check_var(struct fb_var_screeninfo *var,
DBG("savagefb_check_var");
+ if (!var->pixclock)
+ return -EINVAL;
+
var->transp.offset = 0;
var->transp.length = 0;
switch (var->bits_per_pixel) {
diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c
index 803ccb6aa479..009bf1d92644 100644
--- a/drivers/video/fbdev/sis/sis_main.c
+++ b/drivers/video/fbdev/sis/sis_main.c
@@ -1444,6 +1444,8 @@ sisfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
vtotal = var->upper_margin + var->lower_margin + var->vsync_len;
+ if (!var->pixclock)
+ return -EINVAL;
pixclock = var->pixclock;
if((var->vmode & FB_VMODE_MASK) == FB_VMODE_NONINTERLACED) {
diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c
index 2de0e675fd15..8e5bac27542d 100644
--- a/drivers/video/fbdev/stifb.c
+++ b/drivers/video/fbdev/stifb.c
@@ -1158,7 +1158,7 @@ stifb_init_display(struct stifb_info *fb)
}
break;
}
- stifb_blank(0, (struct fb_info *)fb); /* 0=enable screen */
+ stifb_blank(0, fb->info); /* 0=enable screen */
SETUP_FB(fb);
}
diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c
index 42c25dc85197..ac73937073a7 100644
--- a/drivers/video/fbdev/vt8500lcdfb.c
+++ b/drivers/video/fbdev/vt8500lcdfb.c
@@ -374,7 +374,6 @@ static int vt8500lcd_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
- dev_err(&pdev->dev, "no IRQ defined\n");
ret = -ENODEV;
goto failed_free_palette;
}