mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +00:00
20ea6adbf1
Build system: x86_64 Build-tested: bcm2708, bcm2709, bcm2710, bcm2711 Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B Signed-off-by: Marty Jones <mj8263788@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From 9dae4a5ff13701f15f051e3911a83a1e497a4bc3 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
|
|
Date: Sun, 27 Feb 2022 13:47:12 +0100
|
|
Subject: [PATCH] drm/mipi-dbi: Add driver_private member to struct
|
|
mipi_dbi_dev
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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
|
|
---
|
|
include/drm/drm_mipi_dbi.h | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
--- 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)
|