drm/omap: cleanup fbdev init/free

omap_fbdev_init() and omap_fbdev_free() use priv->fbdev directly.
However, omap_fbdev_init() returns the fbdev, and omap_drv.c also
assigns the return value to priv->fbdev. This is slightly confusing.

Clean this up by removing the omap_fbdev_init() return value, as we
don't care whether fbdev init succeeded or not. Also change omap_drv.c
to call omap_fbdev_free() always, and omap_fbdev_free() does the check
if fbdev was initialized.

While at it, rename omap_fbdev_free() to omap_fbdev_fini() to better
match the "init" counterpart.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Tomi Valkeinen
2018-02-09 09:36:23 +02:00
parent e6204a58b9
commit efd1f06be0
3 changed files with 16 additions and 20 deletions

View File

@@ -24,14 +24,13 @@ struct drm_device;
struct drm_fb_helper;
#ifdef CONFIG_DRM_FBDEV_EMULATION
struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev);
void omap_fbdev_free(struct drm_device *dev);
void omap_fbdev_init(struct drm_device *dev);
void omap_fbdev_fini(struct drm_device *dev);
#else
static inline struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev)
static inline void omap_fbdev_init(struct drm_device *dev)
{
return NULL;
}
static inline void omap_fbdev_free(struct drm_device *dev)
static inline void omap_fbdev_fini(struct drm_device *dev)
{
}
#endif