diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2022-02-27 13:47:12 +0100 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-02-28 10:29:33 +0100 |
commit | 1e7e8e18db0fdd4da4e91597cf4d59265b8f351f (patch) | |
tree | a85f111d293fd3108708f31cc706dc59666d76d9 /include | |
parent | 95ae342dc939a220b7afbd3a65f7106258f67cad (diff) | |
download | linux-1e7e8e18db0fdd4da4e91597cf4d59265b8f351f.tar.bz2 |
drm/mipi-dbi: Add driver_private member to struct mipi_dbi_dev
devm_drm_dev_alloc() can't allocate structures that embed a structure
which then again embeds drm_device. Workaround this by adding a
driver_private pointer to struct mipi_dbi_dev which the driver can use for
its additional state.
v3:
- Add documentation
Acked-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220227124713.39766-5-noralf@tronnes.org
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drm_mipi_dbi.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/drm/drm_mipi_dbi.h b/include/drm/drm_mipi_dbi.h index 6fe13cce2670..dad2f187b64b 100644 --- a/include/drm/drm_mipi_dbi.h +++ b/include/drm/drm_mipi_dbi.h @@ -130,6 +130,14 @@ struct mipi_dbi_dev { * @dbi: MIPI DBI interface */ struct mipi_dbi dbi; + + /** + * @driver_private: Driver private data. + * Necessary for drivers with private data since devm_drm_dev_alloc() + * can't allocate structures that embed a structure which then again + * embeds drm_device. + */ + void *driver_private; }; static inline struct mipi_dbi_dev *drm_to_mipi_dbi_dev(struct drm_device *drm) |