[PATCH v2 20/28] fbdev: clps711x-fb: Replace check_fb in favor of struct fb_info.lcd_dev
Andy Shevchenko
andy.shevchenko at gmail.com
Sat Nov 23 20:11:03 UTC 2024
Fri, Sep 06, 2024 at 09:52:34AM +0200, Thomas Zimmermann kirjoitti:
> 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.
...
> + 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);
> if (ret)
> goto out_fb_dealloc_cmap;
>
> - lcd = devm_lcd_device_register(dev, "clps711x-lcd", dev, cfb,
> - &clps711x_lcd_ops);
> - if (!IS_ERR(lcd))
> - return 0;
> + return 0;
>
> - ret = PTR_ERR(lcd);
> unregister_framebuffer(info);
Haven't you got a dead code warning here?
>
> out_fb_dealloc_cmap:
--
With Best Regards,
Andy Shevchenko
More information about the dri-devel
mailing list