Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3454637ybi; Fri, 19 Jul 2019 03:34:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFbhpIsrV/UFY6GACUMAhBfZ6q7kJJcxlpbdWhgPF1lm/s7XYRQkGz2YJ5ZF6MOyFObzUB X-Received: by 2002:a17:90a:bb8b:: with SMTP id v11mr56223253pjr.64.1563532471916; Fri, 19 Jul 2019 03:34:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563532471; cv=none; d=google.com; s=arc-20160816; b=Lj/XjCPLJOu7jUNBcjHzNPH4v6TkGoQyTwMUzUS0PlCQnXqZ9aY+mgtQ+7/3Hz2BC5 phYtmxXIASgAb9LmrBG7lEWUiFnrzw/W2GMaNdT4NMfA1G5VRZHkyJGlUBLEEOcD4VvY Kp5raUaPk/6VmCq3p0ZWvWMQy700ZkGVEM8wlI0Xr5ijaiVbqLiMQjMF9dg8SBBB8tBb Vu4TtRWQsdk9kDBI4SwUCwCZR+HmVQqPyKbBq/GLxPLn1b02YA101Z22i9wsHnjxhSTd PKXjNiJz/1i/xcKyDlesLIwshapw1B+07omEYI1QwRuFYqXxo+6Tblb+X5bCdb66Xze0 Fs9g== 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=h8qhnRgEZihilSgw7kKeGvUMgkb5ifMf+Eyiz0heXJs=; b=kPxTw/+l/Oa1ZcfnqKkePXMo7q4Yq/oFzSydB8Qk0XYMnH3yjzolWTsV14ZVS5O03D 0Y3nrgSoBb8Wpx8f6HawA4/yZe+PGgJeSns+MAyKufpldmgHaKk+Sde5G5ZZWPNSb+Sv N1lq1aAUXxTDvuzt/LXWm1XS95HoDdLkTadbdr1fytsFBeZRaVfxkxfrI7g288LvADv/ qoJxgBTiOSerk1tnZUKH+JmBOrH+t1ogDE6KoFcBVwZ/qoKvSaueFOLEKSISlXE44Uiv njsEEhUMOFEqQeFtCuyuNo8f3LDuprOIYRUKxjtz96oXa2qNmgOPvBWfnqTrdlGe50TX xGGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=EsYFYhi5; 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 g13si1202242pgr.297.2019.07.19.03.34.15; Fri, 19 Jul 2019 03:34:31 -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=EsYFYhi5; 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 S1727681AbfGSKco (ORCPT + 99 others); Fri, 19 Jul 2019 06:32:44 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:43095 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725853AbfGSKco (ORCPT ); Fri, 19 Jul 2019 06:32:44 -0400 Received: by mail-pl1-f196.google.com with SMTP id 4so8454141pld.10; Fri, 19 Jul 2019 03:32:43 -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=h8qhnRgEZihilSgw7kKeGvUMgkb5ifMf+Eyiz0heXJs=; b=EsYFYhi5YLM2CYVaQbmamBSUnTVMml8zoraowbCu2noJpLEblOs1149Bnhj/0mSj8y w09uJ6DNfzL0wFZSLSVFs0iSvBiWKDNu2eEXXkduSOl06NoD/3q1AdVYp4BkidNYjLq+ wlD7597+u9ukQKpU5FNxD2x5ZjMjABkfcvza2gDWFf7k7jfvjfg0AZerDQttBrGw7oZp o9clkP9OtbBSx6igyic2vp3vDwqcF9uipciVX+pe6ORBE61JAgU4KuPkeLOVhsivLCsn l4HaF+Us1nVeL2l2kMMkox7OE965ZfqEpk2sSaSLH4iWMzFwKPRe11oU9eR+zrLywQLa OFzw== 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=h8qhnRgEZihilSgw7kKeGvUMgkb5ifMf+Eyiz0heXJs=; b=DMd2JixK2z1Zqqja2rSfJZvK4FcOQiBznJE3miV0yQE/HKzWcmsNwm/tH7zYi2I/pa W/mQgLhSuEQmU1BF75rYJrarYVR2T0+qbLdZjI1O3B+oY8y4cb+Hx0IpA8lwJOG4QRa6 QHwpmz30zdPWR39OGKUyTuavltJxeUa9NY76TeDFm9lwVoKF5KN/7yqiloH7aDqJ++86 qVqhccX1bvgj36J1d6dTErZzyoFQPCoqcACFlJwLgE6X09mgHsjCUIkHIs4yckHnRa9B JtmhCyWw5/i3h7amzQS6XGnPx2aCGQZYqcIqtEv+KHs5MLPYtmPIdQP5N7ABIHVelH0O wDAw== X-Gm-Message-State: APjAAAXLMnmlH7saggPyv5xCr4fOIOFh6l5ylMWajkj2z8/iKdfLgpv+ cU/2UmQMb31iB+tWgu5noEY= X-Received: by 2002:a17:902:20c8:: with SMTP id v8mr56385548plg.284.1563532363495; Fri, 19 Jul 2019 03:32:43 -0700 (PDT) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([89.31.126.54]) by smtp.gmail.com with ESMTPSA id i15sm34029444pfd.160.2019.07.19.03.32.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 19 Jul 2019 03:32:42 -0700 (PDT) From: Chuhong Yuan Cc: Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , David Airlie , Daniel Vetter , Kukjin Kim , Krzysztof Kozlowski , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH] drm/exynos: Use dev_get_drv_data Date: Fri, 19 Jul 2019 18:31:09 +0800 Message-Id: <20190719103108.19998-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 dev_get_drvdata is a simpler implementation comparing to to_platform_device + platform_get_drvdata. This makes the code simpler. Signed-off-by: Chuhong Yuan --- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_gsc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c index a594ab7be2c0..164d914cbe9a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c @@ -44,7 +44,7 @@ static unsigned int fimc_mask = 0xc; module_param_named(fimc_devs, fimc_mask, uint, 0644); MODULE_PARM_DESC(fimc_devs, "Alias mask for assigning FIMC devices to Exynos DRM"); -#define get_fimc_context(dev) platform_get_drvdata(to_platform_device(dev)) +#define get_fimc_context(dev) dev_get_drvdata(dev) enum { FIMC_CLK_LCLK, diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c index 1e4b21c49a06..1c524db9570f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c @@ -58,7 +58,7 @@ #define GSC_COEF_DEPTH 3 #define GSC_AUTOSUSPEND_DELAY 2000 -#define get_gsc_context(dev) platform_get_drvdata(to_platform_device(dev)) +#define get_gsc_context(dev) dev_get_drvdata(dev) #define gsc_read(offset) readl(ctx->regs + (offset)) #define gsc_write(cfg, offset) writel(cfg, ctx->regs + (offset)) -- 2.20.1