summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2020-04-15 10:40:30 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2020-04-28 17:13:03 +0300
commitcd8294540776f7986b7cf658a3579d576853610c (patch)
treeb373adb239c576857f9876a8b9c7d13e9aaffded /drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
parente95d2f40124992fb60a150e297b6fe96cc4ac741 (diff)
downloadlinux-cd8294540776f7986b7cf658a3579d576853610c.tar.xz
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_crtc.c')
-rw-r--r--drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
index 2184b8be6fd4..e54686c31a90 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
@@ -231,7 +231,7 @@ static const uint32_t aspeed_gfx_formats[] = {
int aspeed_gfx_create_pipe(struct drm_device *drm)
{
- struct aspeed_gfx *priv = drm->dev_private;
+ struct aspeed_gfx *priv = to_aspeed_gfx(drm);
return drm_simple_display_pipe_init(drm, &priv->pipe, &aspeed_gfx_funcs,
aspeed_gfx_formats,