summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/panel/panel-s6e8aa0.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-07-21 15:51:17 +0200
committerThierry Reding <treding@nvidia.com>2014-07-22 09:06:48 +0200
commit9d90ce5c1002928d3bbc1f6014b04bf36c94d803 (patch)
tree1aa141057a253a3ec7d777370a1a7089b22d99bd /drivers/gpu/drm/panel/panel-s6e8aa0.c
parent3c523d7d38a17b17371a9ea952c04a9b65c8a357 (diff)
downloadblackbird-op-linux-9d90ce5c1002928d3bbc1f6014b04bf36c94d803.tar.gz
blackbird-op-linux-9d90ce5c1002928d3bbc1f6014b04bf36c94d803.zip
drm/panel: s6e8aa0: Use static inline for upcasting
Use a static inline function for upcasting a struct drm_panel to the driver-specific structure. The advantage over using a macro is that it gives us additional type checking. Acked-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/panel/panel-s6e8aa0.c')
-rw-r--r--drivers/gpu/drm/panel/panel-s6e8aa0.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panel/panel-s6e8aa0.c b/drivers/gpu/drm/panel/panel-s6e8aa0.c
index 5502ef6bc074..4fe0bbb03230 100644
--- a/drivers/gpu/drm/panel/panel-s6e8aa0.c
+++ b/drivers/gpu/drm/panel/panel-s6e8aa0.c
@@ -120,7 +120,10 @@ struct s6e8aa0 {
int error;
};
-#define panel_to_s6e8aa0(p) container_of(p, struct s6e8aa0, panel)
+static inline struct s6e8aa0 *panel_to_s6e8aa0(struct drm_panel *panel)
+{
+ return container_of(panel, struct s6e8aa0, panel);
+}
static int s6e8aa0_clear_error(struct s6e8aa0 *ctx)
{
OpenPOWER on IntegriCloud