Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8686305ybi; Tue, 23 Jul 2019 13:07:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLOlAitbwkpDJoyqYyUTYQHSOHAobDCJZO2WTSi6nlorpSG/w/LNeY3t+R3OHWZTKCrHPS X-Received: by 2002:a17:90a:29c5:: with SMTP id h63mr80409814pjd.83.1563912464076; Tue, 23 Jul 2019 13:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563912464; cv=none; d=google.com; s=arc-20160816; b=sJedeVyXYHVE7mrcWcgv1ecJ3zFIf+ITCHsZIOv8Y2ZFcNL82toL4wsg2el98uaTCw HdJ/YYBpE1zcgdTX21omHN3v5nXSjTVz2ARR/2Z6BLclogPZg+TRgMieHCiX/+xYHF2m zi2peMmwd1K1AuzhJT1N9xsTismihtB2G70jUl0hcGV6hUn3tAMRVGnsHtWxkqiQLAXQ rOK7R7FeZF5n593xBxbPqX75BSDehhvmYeG6bqqpxQL55Psylx/e6wtZDrFw7eLMk8nF gXe7dy78/SwJt0pACtmalL+5fqc8WfTbI379k8/32LHAFB2F7rvJxE0fiO7e9KSyfXYG ar1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=oJJwPLAueXtxcGlCD6Tbo/0lOc3eLv/7iWCoapVa8ow=; b=MEGGlGUYbzHs4f7Wl+hIcn5fYXicLqm9J2Z3ezrtqm4TrIdHOnCI1+UxcqhXZemfMD 7qp4vi9Lm66zvJ9E+/H1c9uHBWqupLQVZq39afAvTGzlMoCadtgd/BKBXurSfDHtq6H6 lyS1yiGi2bQDeXTH2tHErQraCA/XsVTBoPm13q/wSljj+Ewsmdf6uY4aGF6s/bz/V2B+ oQ07bUIb+CmYXoCurqUAmMR1MJJL3fWo7JQH99U98XOuoRHdJgFRyYA1QXdMIYMwndt3 LQiDCe6np9SIYXiQvux/x5/VigonS/vxK6Rsy7CvkCpc4VT4lM4Ua/EeQre/JIAR+q1d GtdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=H74A0OkK; 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=fail (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 v62si16247566pgv.126.2019.07.23.13.07.28; Tue, 23 Jul 2019 13:07:44 -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=fail header.i=@gmail.com header.s=20161025 header.b=H74A0OkK; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389120AbfGWKiv (ORCPT + 99 others); Tue, 23 Jul 2019 06:38:51 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40986 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389114AbfGWKiv (ORCPT ); Tue, 23 Jul 2019 06:38:51 -0400 Received: by mail-pf1-f196.google.com with SMTP id m30so18946474pff.8 for ; Tue, 23 Jul 2019 03:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oJJwPLAueXtxcGlCD6Tbo/0lOc3eLv/7iWCoapVa8ow=; b=H74A0OkK53PNTxp+3xX64AB7CmCxmHA9QmUrMj5pVW2BzDEsAI/QE3sNuR/4YdN+Bm sBycghr3u74CwximQ0nefQymZWIsB4MyyIN/sMlX8OnH1nKxQGGJPymLXlDyuFrMTG+S LDOeAPkSsMznr0JQ5eIiWZ+T8LTZOzgyn8xJ60yUGySCDHLhCYH/1j0Ln+zuvxwvVZKj YpEw6wstepCt+tGrVAShqHeJxBppgBGWCUnQDMHEWEn1jUypBsPuf1wX0IFA7r21732F fzAQcjTy8in38a56QucG6+PWrZELrxmn8jQSEmeSGjJ4hCAa69KPE8OloZqJTqu8dDgM 7QOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oJJwPLAueXtxcGlCD6Tbo/0lOc3eLv/7iWCoapVa8ow=; b=Kk1bHEEW+HM83qSWDD5Y+dFGCj54WKnWMZC9fNSa+6BwFSmWXNV52e+U/nZroFXuPs S+GuoGC5ocLILfWYrsplEqkOWu+GtqF7o27FWr0BB0WRj5hjsq6820cY/i+f+TAX2wZC ohJZPidA7lrNlVWB+TqxwK/U3TcM+6dip4EF7JFvI1mLHIFPL4lnsnyXO2SWsCqTzXZ0 wLeSal/08ZYSx4/lxKhLEKuwye8ATp0fO+rJJhsiBGEDcToukMTbnmnofQsMSACFB91A iFuPWEza46+DN8FJmRzZncBZTBMbPDK0ajYiZM9HPjG5ObyQWKt8rQJDipOUs+lu5b2Y 0mGg== X-Gm-Message-State: APjAAAVHyskkjwa2jKEUCi7P2j0IsAM9HvwLGT0SjJdloPlmOCHTk9J5 DJ21tsyNY7udPxsExE4QrWs= X-Received: by 2002:a17:90a:d14b:: with SMTP id t11mr81701030pjw.79.1563878330481; Tue, 23 Jul 2019 03:38:50 -0700 (PDT) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([89.31.126.54]) by smtp.gmail.com with ESMTPSA id o11sm72345572pfh.114.2019.07.23.03.38.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 03:38:49 -0700 (PDT) From: Chuhong Yuan Cc: Patrik Jakobsson , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH] drm/gma500: Use dev_get_drvdata where possible Date: Tue, 23 Jul 2019 18:38:30 +0800 Message-Id: <20190723103829.3848-1-hslester96@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan --- drivers/gpu/drm/gma500/power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c index bea8578846d1..d67e01ce7766 100644 --- a/drivers/gpu/drm/gma500/power.c +++ b/drivers/gpu/drm/gma500/power.c @@ -308,7 +308,7 @@ int psb_runtime_resume(struct device *dev) int psb_runtime_idle(struct device *dev) { - struct drm_device *drmdev = pci_get_drvdata(to_pci_dev(dev)); + struct drm_device *drmdev = dev_get_drvdata(dev); struct drm_psb_private *dev_priv = drmdev->dev_private; if (dev_priv->display_count) return 0; -- 2.20.1