Skip to content

Commit 719ac2b

Browse files
notropopcornmix
authored andcommitted
drm/mipi-dbi: Add driver_private member to struct mipi_dbi_dev
commit 1e7e8e1 upstream. 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
1 parent 9722ea1 commit 719ac2b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎include/drm/drm_mipi_dbi.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ struct mipi_dbi_dev {
130130
* @dbi: MIPI DBI interface
131131
*/
132132
struct mipi_dbi dbi;
133+
134+
/**
135+
* @driver_private: Driver private data.
136+
* Necessary for drivers with private data since devm_drm_dev_alloc()
137+
* can't allocate structures that embed a structure which then again
138+
* embeds drm_device.
139+
*/
140+
void *driver_private;
133141
};
134142

135143
static inline struct mipi_dbi_dev *drm_to_mipi_dbi_dev(struct drm_device *drm)

0 commit comments

Comments
 (0)