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:
@@ -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
|
||||
|
Reference in New Issue
Block a user