diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-04-15 09:40:30 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-04-28 16:13:03 +0200 |
commit | cd8294540776f7986b7cf658a3579d576853610c (patch) | |
tree | b373adb239c576857f9876a8b9c7d13e9aaffded /drivers/gpu/drm/aspeed/aspeed_gfx.h | |
parent | e95d2f40124992fb60a150e297b6fe96cc4ac741 (diff) |
drm/aspeed: Use devm_drm_dev_alloc
As usual, we can drop the drm_dev_put() and need to embed the
drm_device. Since it's so few, also go right ahead and leave
drm_device->dev_private set to NULL, so that we always use the
container_of() upcast, which is faster anyway.
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@aj.id.au>
Cc: linux-aspeed@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-56-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/aspeed/aspeed_gfx.h')
-rw-r--r-- | drivers/gpu/drm/aspeed/aspeed_gfx.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx.h b/drivers/gpu/drm/aspeed/aspeed_gfx.h index adc02940de6f..e7ca95827ae8 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx.h +++ b/drivers/gpu/drm/aspeed/aspeed_gfx.h @@ -5,6 +5,7 @@ #include <drm/drm_simple_kms_helper.h> struct aspeed_gfx { + struct drm_device drm; void __iomem *base; struct clk *clk; struct reset_control *rst; @@ -13,6 +14,7 @@ struct aspeed_gfx { struct drm_simple_display_pipe pipe; struct drm_connector connector; }; +#define to_aspeed_gfx(x) container_of(x, struct aspeed_gfx, drm) int aspeed_gfx_create_pipe(struct drm_device *drm); int aspeed_gfx_create_output(struct drm_device *drm); |