aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_fbdev.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2018-02-09 02:36:23 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-03-01 02:18:18 -0500
commitefd1f06be004a6a384f0482ef76c12bc202e1b8e (patch)
tree9c63f8ac2d2bd50f16def64569e48b47333c28c8 /drivers/gpu/drm/omapdrm/omap_fbdev.h
parente6204a58b9e9ad01ab9c6d4b8b2b8b9c4e38bbba (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_fbdev.h')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_fbdev.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.h b/drivers/gpu/drm/omapdrm/omap_fbdev.h
index 1f5ba0996a1a..7dfd843f73f1 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.h
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.h
@@ -24,14 +24,13 @@ struct drm_device;
24struct drm_fb_helper; 24struct drm_fb_helper;
25 25
26#ifdef CONFIG_DRM_FBDEV_EMULATION 26#ifdef CONFIG_DRM_FBDEV_EMULATION
27struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev); 27void omap_fbdev_init(struct drm_device *dev);
28void omap_fbdev_free(struct drm_device *dev); 28void omap_fbdev_fini(struct drm_device *dev);
29#else 29#else
30static inline struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev) 30static inline void omap_fbdev_init(struct drm_device *dev)
31{ 31{
32 return NULL;
33} 32}
34static inline void omap_fbdev_free(struct drm_device *dev) 33static inline void omap_fbdev_fini(struct drm_device *dev)
35{ 34{
36} 35}
37#endif 36#endif