Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8983066ybi; Tue, 23 Jul 2019 19:26:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyK5RfBGfjh9qKtyDV4XAJBVOGrhQ24JMc1/xw4ldqUW9/48j3UO2ykRHhU6eCP0XPWeuBW X-Received: by 2002:a65:4103:: with SMTP id w3mr64089459pgp.1.1563935206519; Tue, 23 Jul 2019 19:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563935206; cv=none; d=google.com; s=arc-20160816; b=MO6upBhtSwzvUiraGxjkUHAV6M3CMq+mTIa3LjuUGZQqmtDqcRawnx83qCw1+4Iuz6 7dJFtxlshxkhJQDA9d6X4QTeWX4IE7B4mB5eXdzn5tfMb+YURZrOVjao3YUpkcaWWjZz sQ4oNJu0muXgDm+Pb3suXkZDQzDgf+EgPMQ1OYNYfpIh9dG37G5qIvpZXpJut3gfwTZC exZBSXwJ12n9/Qod5IMvNr+J/6ZzIQnrRfTa4GJUx4S0JzzeYYk4tnp5j1pL4lDWHXt3 9oHmiW1Ct/61a5A80LUxyEMSNzwOXskJXUtRPbfnJox80f07BcOmwnftnlKjFDLQMSJ4 0voA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=50RPD9GLsElecVaxEmMiICG57vQta+1Z/U/1fgFGurI=; b=buCCJFo421p1aPffgiQVvR1WG+Zsbu3i4mRh7cXK4ddCtd9twgh0BJr1gyr2Qy4Z5k rZnJl1rXnDKc2yVSkH61C+npOuE1WDQPlSjhjzOWEBT1NmqgULXBXb/sBcaFlD+UmS+a 8vRXgtL69OfqAUjE2+NCqblPBPK8SbP4NfZRDsbTZmqR1mSq0Z666XBfdlsxhtt/wzDh R0wKjskVkaYanUqMkdDQW8Kyitc65+EwJ9ktGBIr+wgTt4jhgZq4cJt5LYCw015NiZuA cD6iNjQiHRr2lhKKSW0iIs/GZm7s9ODLrcQ51HKy5F8Mj3UdXysKHFao8fJrJ18MM2NC Db4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kngDeBL3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l143si12902053pfd.162.2019.07.23.19.26.31; Tue, 23 Jul 2019 19:26:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kngDeBL3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403841AbfGWStH (ORCPT + 99 others); Tue, 23 Jul 2019 14:49:07 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:50273 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728243AbfGWStH (ORCPT ); Tue, 23 Jul 2019 14:49:07 -0400 Received: by mail-wm1-f65.google.com with SMTP id v15so39557553wml.0 for ; Tue, 23 Jul 2019 11:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=50RPD9GLsElecVaxEmMiICG57vQta+1Z/U/1fgFGurI=; b=kngDeBL36QOC6g0JB7S6cR1lhpzLh4otWj87pagk/hSxoPfkAndr5cH4/zmDAli2AW cUoCnBxw+utC2sshc7SB2UL281hJy/Ti+dwzeOCuF40/ARDSPiEI/YDfhudVDoyhrZ0Z ZsPbtuXe8KQtx4Ez/0YtuX3NZBfXLXwZn7UlsTguuCPmsXA39d792G18XFG0n2yR7SNY BzkFr47/947Tfaz2eO/kaQsroOs1iFrBUKKai5hUv/1YCLKWHTRIBga747rT8oYtJH2E ChgD3vpjkhHdBdjwK158ckcINm4Zc/37GjZSN6UhYfLjv7J89ujaFKcr7u567HLut6/F WCnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=50RPD9GLsElecVaxEmMiICG57vQta+1Z/U/1fgFGurI=; b=etIIPb9MhbbTvZh3kEsdGeSEw3eXd5BKh1zBXZch2eMgoTlk04eZG2pZHwuajwbKVa 7GdGIW4KCCLovsrNQ0AkHmCDPev3xO+H6ZpnFVRfKZcgFxGYhjn4U4NcFqzO3MTbEim9 F0vV0iCNQ61HM3++UeLCO0n7irabrOYiHKwdTAHkYExHi4b53hHreILYDEsRLZKT9jBU /KQKYGQZ44bx0kzQapJ88uGitDGojGHYn9vs9BgMAVrqg/m30VkdXjysDi8I+uZy2v0s yP3vQdnAmr7FLJmZJyPQswKJo164TE/PX5doEWVAXSvmoQ/hnViIQ0AQ7XZ8/cJST0J+ I+KQ== X-Gm-Message-State: APjAAAVugwJc4vJX/O/B6+Uwe0aippLhxvBLsVc220VIihPX2ucvNPmu 6lq1FdUmO0jjZvh7MQuT/cxl0s9J1LbuZTY3cRE= X-Received: by 2002:a1c:a1c5:: with SMTP id k188mr70227662wme.102.1563907745335; Tue, 23 Jul 2019 11:49:05 -0700 (PDT) MIME-Version: 1.0 References: <20190723090421.27532-1-hslester96@gmail.com> In-Reply-To: <20190723090421.27532-1-hslester96@gmail.com> From: Alex Deucher Date: Tue, 23 Jul 2019 14:48:54 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/display: Use dev_get_drvdata To: Chuhong Yuan Cc: David Zhou , Leo Li , LKML , amd-gfx list , David Airlie , Maling list - DRI developers , Daniel Vetter , Alex Deucher , Harry Wentland , =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 23, 2019 at 9:36 AM Chuhong Yuan wrote: > > Instead of using to_pci_dev + pci_get_drvdata, > use dev_get_drvdata to make code simpler. > > Signed-off-by: Chuhong Yuan Applied. thanks! Alex > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > index 4a29f72334d0..524e1e19017e 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -2428,8 +2428,7 @@ static ssize_t s3_debug_store(struct device *device, > { > int ret; > int s3_state; > - struct pci_dev *pdev = to_pci_dev(device); > - struct drm_device *drm_dev = pci_get_drvdata(pdev); > + struct drm_device *drm_dev = dev_get_drvdata(device); > struct amdgpu_device *adev = drm_dev->dev_private; > > ret = kstrtoint(buf, 0, &s3_state); > -- > 2.20.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx