From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Harvey Subject: [PATCH] drm/mgag200: Cleanup: Pass driver specific mga_device in driver functions Date: Tue, 26 Feb 2013 10:54:45 -0500 Message-ID: <20130226155445.GA18636@harvey-pc.matrox.com> References: <20130226155255.GA18595@harvey-pc.matrox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mtxmxout7.matrox.com (mtxmxout9.matrox.com [138.11.2.99]) by gabe.freedesktop.org (Postfix) with ESMTP id 49562E65B1 for ; Tue, 26 Feb 2013 08:14:34 -0800 (PST) Received: from mars.matrox.com (mars.matrox.com [192.168.1.29]) by mtxmxout7.matrox.com (Postfix) with ESMTP id 7AC891C6E07 for ; Tue, 26 Feb 2013 10:50:25 -0500 (EST) Received: (from ssmsp@localhost) by mars.matrox.com (8.14.4/8.13.2) id r1QFoPMr011593 for dri-devel@lists.freedesktop.org; Tue, 26 Feb 2013 10:50:25 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mars.matrox.com (Postfix) with ESMTP id 0066795210 for ; Tue, 26 Feb 2013 10:50:25 -0500 (EST) Received: from pluton.matrox.com (pluton.matrox.com [192.168.8.7]) by mars.matrox.com (Postfix) with ESMTP id CC1FC951F3 for ; Tue, 26 Feb 2013 10:50:24 -0500 (EST) Content-Disposition: inline In-Reply-To: <20130226155255.GA18595@harvey-pc.matrox.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: Julia Lemire , Mathieu Larouche List-Id: dri-devel@lists.freedesktop.org Signed-off-by: Christopher Harvey --- drivers/gpu/drm/mgag200/mgag200_mode.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index d3d99a2..3abf197 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -1261,9 +1261,8 @@ static const struct drm_crtc_helper_funcs mga_helper_funcs = { }; /* CRTC setup */ -static void mga_crtc_init(struct drm_device *dev) +static void mga_crtc_init(struct mga_device *mdev) { - struct mga_device *mdev = dev->dev_private; struct mga_crtc *mga_crtc; int i; @@ -1274,7 +1273,7 @@ static void mga_crtc_init(struct drm_device *dev) if (mga_crtc == NULL) return; - drm_crtc_init(dev, &mga_crtc->base, &mga_crtc_funcs); + drm_crtc_init(mdev->dev, &mga_crtc->base, &mga_crtc_funcs); drm_mode_crtc_set_gamma_size(&mga_crtc->base, MGAG200_LUT_SIZE); mdev->mode_info.crtc = mga_crtc; @@ -1502,7 +1501,7 @@ int mgag200_modeset_init(struct mga_device *mdev) mdev->dev->mode_config.fb_base = mdev->mc.vram_base; - mga_crtc_init(mdev->dev); + mga_crtc_init(mdev); encoder = mga_encoder_init(mdev->dev); if (!encoder) { -- 1.7.12.4