From patchwork Wed Feb 20 14:34:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Harvey X-Patchwork-Id: 2500981 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id A2308DF25A for ; Mon, 29 Apr 2013 18:40:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 99E0AE5F4C for ; Mon, 29 Apr 2013 11:40:33 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mtxmxout5.matrox.com (mtxmxout5.matrox.com [138.11.2.95]) by gabe.freedesktop.org (Postfix) with ESMTP id 425A5E615A for ; Mon, 29 Apr 2013 11:38:50 -0700 (PDT) Received: from mars.matrox.com (mars.matrox.com [192.168.1.29]) by mtxmxout5.matrox.com (Postfix) with ESMTP id BF18E1C6D6A for ; Mon, 29 Apr 2013 14:38:49 -0400 (EDT) Received: (from ssmsp@localhost) by mars.matrox.com (8.14.4/8.13.2) id r3TIcnx4005002 for dri-devel@lists.freedesktop.org; Mon, 29 Apr 2013 14:38:49 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mars.matrox.com (Postfix) with ESMTP id 2D8369535D for ; Mon, 29 Apr 2013 14:38:49 -0400 (EDT) X-Virus-MTX-Scanned: by Matrox Virus scanner at mars.matrox.com Received: from pluton.matrox.com (pluton.matrox.com [192.168.8.7]) by mars.matrox.com (Postfix) with ESMTP id EAB0F951E4 for ; Mon, 29 Apr 2013 14:38:48 -0400 (EDT) Received: from matrox.com (dyn-152-224.matrox.com [192.168.152.224]) by pluton.matrox.com (Postfix) with ESMTP id E65567F45F; Mon, 29 Apr 2013 14:38:48 -0400 (EDT) Message-Id: <5fb026823c3f5a6801ff34936fbc40678666bd24.1367260670.git.charvey@matrox.com> In-Reply-To: References: From: Christopher Harvey Date: Wed, 20 Feb 2013 09:34:22 -0500 Subject: [PATCH] drm/mgag200: Pass driver specific mga_device in driver functions To: dri-devel@lists.freedesktop.org Cc: Mathieu Larouche X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@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 78d8e91..f988965 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -1254,9 +1254,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; @@ -1267,7 +1266,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; @@ -1522,7 +1521,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) {