mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 21:48:54 +02:00
fbdev: clps711x-fb: Replace check_fb in favor of struct fb_info.lcd_dev
Store the lcd device in struct fb_info.lcd_dev. The lcd subsystem can now detect the lcd's fbdev device from this field. This makes the implementation of check_fb in clps711x_lcd_ops obsolete. Remove it. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-21-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
e5dfbbd39e
commit
36462ac193
|
|
@ -162,13 +162,6 @@ static const struct fb_ops clps711x_fb_ops = {
|
||||||
.fb_blank = clps711x_fb_blank,
|
.fb_blank = clps711x_fb_blank,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int clps711x_lcd_check_fb(struct lcd_device *lcddev, struct fb_info *fi)
|
|
||||||
{
|
|
||||||
struct clps711x_fb_info *cfb = dev_get_drvdata(&lcddev->dev);
|
|
||||||
|
|
||||||
return (!fi || fi->par == cfb) ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int clps711x_lcd_get_power(struct lcd_device *lcddev)
|
static int clps711x_lcd_get_power(struct lcd_device *lcddev)
|
||||||
{
|
{
|
||||||
struct clps711x_fb_info *cfb = dev_get_drvdata(&lcddev->dev);
|
struct clps711x_fb_info *cfb = dev_get_drvdata(&lcddev->dev);
|
||||||
|
|
@ -198,7 +191,6 @@ static int clps711x_lcd_set_power(struct lcd_device *lcddev, int blank)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct lcd_ops clps711x_lcd_ops = {
|
static const struct lcd_ops clps711x_lcd_ops = {
|
||||||
.check_fb = clps711x_lcd_check_fb,
|
|
||||||
.get_power = clps711x_lcd_get_power,
|
.get_power = clps711x_lcd_get_power,
|
||||||
.set_power = clps711x_lcd_set_power,
|
.set_power = clps711x_lcd_set_power,
|
||||||
};
|
};
|
||||||
|
|
@ -325,16 +317,21 @@ static int clps711x_fb_probe(struct platform_device *pdev)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_fb_dealloc_cmap;
|
goto out_fb_dealloc_cmap;
|
||||||
|
|
||||||
|
lcd = devm_lcd_device_register(dev, "clps711x-lcd", dev, cfb,
|
||||||
|
&clps711x_lcd_ops);
|
||||||
|
if (IS_ERR(lcd)) {
|
||||||
|
ret = PTR_ERR(lcd);
|
||||||
|
goto out_fb_dealloc_cmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
info->lcd_dev = lcd;
|
||||||
|
|
||||||
ret = register_framebuffer(info);
|
ret = register_framebuffer(info);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_fb_dealloc_cmap;
|
goto out_fb_dealloc_cmap;
|
||||||
|
|
||||||
lcd = devm_lcd_device_register(dev, "clps711x-lcd", dev, cfb,
|
return 0;
|
||||||
&clps711x_lcd_ops);
|
|
||||||
if (!IS_ERR(lcd))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
ret = PTR_ERR(lcd);
|
|
||||||
unregister_framebuffer(info);
|
unregister_framebuffer(info);
|
||||||
|
|
||||||
out_fb_dealloc_cmap:
|
out_fb_dealloc_cmap:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user