1 From 9dae4a5ff13701f15f051e3911a83a1e497a4bc3 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
3 Date: Sun, 27 Feb 2022 13:47:12 +0100
4 Subject: [PATCH] drm/mipi-dbi: Add driver_private member to struct
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 commit 1e7e8e1 upstream.
12 devm_drm_dev_alloc() can't allocate structures that embed a structure
13 which then again embeds drm_device. Workaround this by adding a
14 driver_private pointer to struct mipi_dbi_dev which the driver can use for
20 Acked-by: Maxime Ripard <maxime@cerno.tech>
21 Acked-by: Sam Ravnborg <sam@ravnborg.org>
22 Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
23 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
24 Link: https://patchwork.freedesktop.org/patch/msgid/20220227124713.39766-5-noralf@tronnes.org
26 include/drm/drm_mipi_dbi.h | 8 ++++++++
27 1 file changed, 8 insertions(+)
29 --- a/include/drm/drm_mipi_dbi.h
30 +++ b/include/drm/drm_mipi_dbi.h
31 @@ -130,6 +130,14 @@ struct mipi_dbi_dev {
32 * @dbi: MIPI DBI interface
37 + * @driver_private: Driver private data.
38 + * Necessary for drivers with private data since devm_drm_dev_alloc()
39 + * can't allocate structures that embed a structure which then again
40 + * embeds drm_device.
42 + void *driver_private;
45 static inline struct mipi_dbi_dev *drm_to_mipi_dbi_dev(struct drm_device *drm)