summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2019-02-10 14:10:34 +0100
committerNoralf Trønnes <noralf@tronnes.org>2019-02-21 12:22:08 +0100
commit4f83479891430556dbe287d465ea611f2f49e82e (patch)
tree08560d79da5297687b99f0d6675a9e42318759be /include
parentd0a516347688eb031902852aaa7f5e72ee1db3c8 (diff)
drm/tinydrm/mipi-dbi: Add drm_to_mipi_dbi()
Add a function to derive mipi_dbi from drm_device now that tinydrm_device is going away. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190210131039.52664-8-noralf@tronnes.org
Diffstat (limited to 'include')
-rw-r--r--include/drm/tinydrm/mipi-dbi.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/drm/tinydrm/mipi-dbi.h b/include/drm/tinydrm/mipi-dbi.h
index f4ec2834bc22..ad7e6bedab5f 100644
--- a/include/drm/tinydrm/mipi-dbi.h
+++ b/include/drm/tinydrm/mipi-dbi.h
@@ -56,9 +56,10 @@ struct mipi_dbi {
struct regulator *regulator;
};
-static inline struct mipi_dbi *
-mipi_dbi_from_tinydrm(struct tinydrm_device *tdev)
+static inline struct mipi_dbi *drm_to_mipi_dbi(struct drm_device *drm)
{
+ struct tinydrm_device *tdev = drm->dev_private;
+
return container_of(tdev, struct mipi_dbi, tinydrm);
}