Commit f08c6c53 authored by Thomas Zimmermann's avatar Thomas Zimmermann

fbdev/sh7760fb: Use fb_dbg() in sh7760fb_get_color_info()

Give struct fb_info to sh7760fb_get_color_info() and use it in
call to fb_dbg(). Prepares fbdev for making struct fb_info.dev
optional.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-26-tzimmermann@suse.de
parent d850f1c3
...@@ -118,7 +118,7 @@ static int sh7760_setcolreg (u_int regno, ...@@ -118,7 +118,7 @@ static int sh7760_setcolreg (u_int regno,
return 0; return 0;
} }
static int sh7760fb_get_color_info(struct device *dev, static int sh7760fb_get_color_info(struct fb_info *info,
u16 lddfr, int *bpp, int *gray) u16 lddfr, int *bpp, int *gray)
{ {
int lbpp, lgray; int lbpp, lgray;
...@@ -150,7 +150,7 @@ static int sh7760fb_get_color_info(struct device *dev, ...@@ -150,7 +150,7 @@ static int sh7760fb_get_color_info(struct device *dev,
lgray = 0; lgray = 0;
break; break;
default: default:
dev_dbg(dev, "unsupported LDDFR bit depth.\n"); fb_dbg(info, "unsupported LDDFR bit depth.\n");
return -EINVAL; return -EINVAL;
} }
...@@ -170,7 +170,7 @@ static int sh7760fb_check_var(struct fb_var_screeninfo *var, ...@@ -170,7 +170,7 @@ static int sh7760fb_check_var(struct fb_var_screeninfo *var,
int ret, bpp; int ret, bpp;
/* get color info from register value */ /* get color info from register value */
ret = sh7760fb_get_color_info(info->dev, par->pd->lddfr, &bpp, NULL); ret = sh7760fb_get_color_info(info, par->pd->lddfr, &bpp, NULL);
if (ret) if (ret)
return ret; return ret;
...@@ -222,7 +222,7 @@ static int sh7760fb_set_par(struct fb_info *info) ...@@ -222,7 +222,7 @@ static int sh7760fb_set_par(struct fb_info *info)
vdln = vm->yres; vdln = vm->yres;
/* get color info from register value */ /* get color info from register value */
ret = sh7760fb_get_color_info(info->dev, par->pd->lddfr, &bpp, &gray); ret = sh7760fb_get_color_info(info, par->pd->lddfr, &bpp, &gray);
if (ret) if (ret)
return ret; return ret;
...@@ -381,7 +381,7 @@ static int sh7760fb_alloc_mem(struct fb_info *info) ...@@ -381,7 +381,7 @@ static int sh7760fb_alloc_mem(struct fb_info *info)
return 0; return 0;
/* get color info from register value */ /* get color info from register value */
ret = sh7760fb_get_color_info(info->dev, par->pd->lddfr, &bpp, NULL); ret = sh7760fb_get_color_info(info, par->pd->lddfr, &bpp, NULL);
if (ret) { if (ret) {
printk(KERN_ERR "colinfo\n"); printk(KERN_ERR "colinfo\n");
return ret; return ret;
......
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