diff options
author | Thierry Reding <treding@nvidia.com> | 2014-08-05 08:59:01 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-08-06 16:44:16 +0200 |
commit | dff2ed275454b5a69b785949be73e2dcbb686e3f (patch) | |
tree | d94a3eb154e67a4798aafe3b716e2c55a58f830f | |
parent | 5f1dcd8b7ec8189c2b147cdaa1589d5644c3cef3 (diff) | |
download | linux-dff2ed275454b5a69b785949be73e2dcbb686e3f.tar.gz linux-dff2ed275454b5a69b785949be73e2dcbb686e3f.tar.bz2 linux-dff2ed275454b5a69b785949be73e2dcbb686e3f.zip |
drm/panel: ld9040: Replace upcasting macro by function
Using a function instead of a macro provides proper type checking.
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r-- | drivers/gpu/drm/panel/panel-ld9040.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panel/panel-ld9040.c b/drivers/gpu/drm/panel/panel-ld9040.c index c6aa7f717fa4..42ac67b21e9f 100644 --- a/drivers/gpu/drm/panel/panel-ld9040.c +++ b/drivers/gpu/drm/panel/panel-ld9040.c @@ -110,7 +110,10 @@ struct ld9040 { int error; }; -#define panel_to_ld9040(p) container_of(p, struct ld9040, panel) +static inline struct ld9040 *panel_to_ld9040(struct drm_panel *panel) +{ + return container_of(panel, struct ld9040, panel); +} static int ld9040_clear_error(struct ld9040 *ctx) { |