Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3953667ybl; Mon, 26 Aug 2019 03:12:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAQnvfyNRDmV5vVAveQ/F1frh9WpChS/328kwZysOFCu1DjawKb3Kc836DjNCGSLaYpR/7 X-Received: by 2002:a17:902:d207:: with SMTP id t7mr15806463ply.305.1566814347854; Mon, 26 Aug 2019 03:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566814347; cv=none; d=google.com; s=arc-20160816; b=TKDCZ8CYLyQ2Li+cNRZ9uIoMiqVyiYb95iPLxRgpWj1+G+RqKGQCBPaleXxcijnzjh OydbBXQDQq9ZF6uyba/QKTP9dXq0RUUqnvkB3m8CtG+ZdPewFYUw4SsswAQCxAv4rG52 LHX6vQQuB75NQM85+h/pzOHApTdM9XSTT7PydUhhXM/MVjjBTsPKaAZ1DCTMqsd4aZAN FSlg4pc5DP/4jGiUFH7tMVYfC5TjsT3UXM36Ga97htGVSwI905X/eDXSxIVoG0sFr+hT ceIE3sSQNZnSDueFp+wS/c4UemgMrPPn93VdXoBQ+KmuXM7XhA6BfvqEias8+CvLZw+f w2Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=wxOAX3I+yt0r2lQQMG9HlTTcG2Cd1as+ZL9/NR6TQtg=; b=i8vFjLhWnDs2T5mtdcCl8i7knCAg4/HSekMLsP2aYVJLz9GpGy6FACegzUw/xc137H bq2nFpHG36N2s/wHpPGrROlV+vOw0f/Vd/rcxxztasIKUXac8eeZOxdHzrpzk8Y0T06g Q6K6bIqh3gikp4+x2qet7HxI21JkaNh8jaf5IAECGwn5W6D2nLGGO5/Njou1JVUm+Mh/ PMoLRW+ZHXxvLlzmPu5Vaje0qT7rYf5K3f/piK1JDRSbhaSD6EV/2e8zLpClcr87spVG kb1dUXkVFLcEXrbxX6p4vWGeyH98WJfL2S44BRM64CTLnwd4+q61yDc0YDIr+3fwcLn+ 59Qw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j23si8410728pgh.535.2019.08.26.03.12.12; Mon, 26 Aug 2019 03:12:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730704AbfHZJLA (ORCPT + 99 others); Mon, 26 Aug 2019 05:11:00 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:39394 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729753AbfHZJK7 (ORCPT ); Mon, 26 Aug 2019 05:10:59 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 98E03EE471DA0DD908C3; Mon, 26 Aug 2019 17:10:57 +0800 (CST) Received: from [127.0.0.1] (10.57.77.74) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Mon, 26 Aug 2019 17:10:52 +0800 Subject: Re: [PATCH] drm/hisilicon: Use dev_get_drvdata To: Chuhong Yuan References: <20190723103852.3907-1-hslester96@gmail.com> CC: Rongrong Zou , David Airlie , Daniel Vetter , , From: xinliang Message-ID: <5D63A21B.1020207@hisilicon.com> Date: Mon, 26 Aug 2019 17:10:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20190723103852.3907-1-hslester96@gmail.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.57.77.74] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2019/7/23 18:38, 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 Chuhong, thanks for the patch. And sorry for late reply. Acked-by: Xinliang Liu Applied to drm-hisilicon-hibmc-next. Thanks, Xinliang > --- > drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > index ce89e56937b0..f0be263feff5 100644 > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > @@ -60,16 +60,14 @@ static struct drm_driver hibmc_driver = { > > static int __maybe_unused hibmc_pm_suspend(struct device *dev) > { > - struct pci_dev *pdev = to_pci_dev(dev); > - struct drm_device *drm_dev = pci_get_drvdata(pdev); > + struct drm_device *drm_dev = dev_get_drvdata(dev); > > return drm_mode_config_helper_suspend(drm_dev); > } > > static int __maybe_unused hibmc_pm_resume(struct device *dev) > { > - struct pci_dev *pdev = to_pci_dev(dev); > - struct drm_device *drm_dev = pci_get_drvdata(pdev); > + struct drm_device *drm_dev = dev_get_drvdata(dev); > > return drm_mode_config_helper_resume(drm_dev); > }