From patchwork Tue Feb 9 21:13:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 12079189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2568BC433DB for ; Tue, 9 Feb 2021 21:14:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B49C664E74 for ; Tue, 9 Feb 2021 21:14:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B49C664E74 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=inria.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=0lIbMizmtbYfitn72BRVYfcjM3ccTePQ2eG8sH7C++E=; b=QAIgExhkycCETfgs2z0VgLp4QV 3ilPChN6b+AQsnw23MiTUCbrUYTtxmthAYmCEJIsQNsbjCNYXnptXulmnYUFhZ1DCf0ytdaBFb+bI PsmBFuQTB6P72XVeeG92u+ov6u6Iz6Ze8lWfQaTJzXq0qXU/eFgldlWfD5UjAqrdogxPBtIGiVm0P DmobIB6FbYoZ3sZj83hcZG1qlW4yyb9KhTM0VSFLoupZcL4H+Jbk/0mfTEI74gYTnTMaBuQm9ORjp vKd+2nE4KSyJFRtxzWaDAXDdkGQzKWEyyTJE2i+E9QdZBXPhwRJWD0gcGof64HLwbEReJueE4kOrV Wx1rMRlg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9aJz-0001BK-R2; Tue, 09 Feb 2021 21:13:19 +0000 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9aJv-00019j-Ia; Tue, 09 Feb 2021 21:13:16 +0000 X-IronPort-AV: E=Sophos;i="5.81,166,1610406000"; d="scan'208";a="492125955" Received: from palace.lip6.fr ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Feb 2021 22:13:10 +0100 From: Julia Lawall To: David Airlie Subject: [PATCH] drm: use getter/setter functions Date: Tue, 9 Feb 2021 22:13:04 +0100 Message-Id: <20210209211304.1261740-1-Julia.Lawall@inria.fr> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210209_161315_848536_7B611322 X-CRM114-Status: GOOD ( 11.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , =?utf-8?q?Heiko_St=C3=BCbner?= , linux-aspeed@lists.ozlabs.org, Neil Armstrong , Andrew Jeffery , Jonas Karlman , kernel-janitors@vger.kernel.org, Sandy Huang , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Andrzej Hajda , Thierry Reding , Laurent Pinchart , Daniel Vetter , linux-rockchip@lists.infradead.org, Sam Ravnborg , linux-arm-kernel@lists.infradead.org, Joel Stanley Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use getter and setter functions, for platform_device structures and a mipi_dsi_device structure. Signed-off-by: Julia Lawall --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 2 +- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 2 +- drivers/gpu/drm/panel/panel-lvds.c | 2 +- drivers/gpu/drm/panel/panel-seiko-43wvf1g.c | 4 ++-- drivers/gpu/drm/panel/panel-simple.c | 2 +- drivers/gpu/drm/rockchip/rockchip_lvds.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 4e2dad314c79..9858079f9e14 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -4800,7 +4800,7 @@ static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi) err = mipi_dsi_attach(dsi); if (err) { - struct panel_simple *panel = dev_get_drvdata(&dsi->dev); + struct panel_simple *panel = mipi_dsi_get_drvdata(dsi); drm_panel_remove(&panel->base); } diff --git a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c index 0ee508576231..3939b25e6666 100644 --- a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c +++ b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c @@ -267,7 +267,7 @@ static int seiko_panel_probe(struct device *dev, static int seiko_panel_remove(struct platform_device *pdev) { - struct seiko_panel *panel = dev_get_drvdata(&pdev->dev); + struct seiko_panel *panel = platform_get_drvdata(pdev); drm_panel_remove(&panel->base); drm_panel_disable(&panel->base); @@ -277,7 +277,7 @@ static int seiko_panel_remove(struct platform_device *pdev) static void seiko_panel_shutdown(struct platform_device *pdev) { - struct seiko_panel *panel = dev_get_drvdata(&pdev->dev); + struct seiko_panel *panel = platform_get_drvdata(pdev); drm_panel_disable(&panel->base); } diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c index 654bc52d9ff3..bd5ba10822c2 100644 --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c @@ -725,7 +725,7 @@ static int rockchip_lvds_probe(struct platform_device *pdev) static int rockchip_lvds_remove(struct platform_device *pdev) { - struct rockchip_lvds *lvds = dev_get_drvdata(&pdev->dev); + struct rockchip_lvds *lvds = platform_get_drvdata(pdev); component_del(&pdev->dev, &rockchip_lvds_component_ops); clk_unprepare(lvds->pclk); diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index 457ec04950f7..c7707338bfdb 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -284,7 +284,7 @@ static int aspeed_gfx_probe(struct platform_device *pdev) if (ret) return ret; - dev_set_drvdata(&pdev->dev, priv); + platform_set_drvdata(pdev, priv); ret = sysfs_create_group(&pdev->dev.kobj, &aspeed_sysfs_attr_group); if (ret) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c index d0c65610ebb5..989a05bc8197 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c @@ -2457,7 +2457,7 @@ static int cdns_mhdp_probe(struct platform_device *pdev) static int cdns_mhdp_remove(struct platform_device *pdev) { - struct cdns_mhdp_device *mhdp = dev_get_drvdata(&pdev->dev); + struct cdns_mhdp_device *mhdp = platform_get_drvdata(pdev); unsigned long timeout = msecs_to_jiffies(100); bool stop_fw = false; int ret; diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c index 66c7d765b8f7..59a8d99e777d 100644 --- a/drivers/gpu/drm/panel/panel-lvds.c +++ b/drivers/gpu/drm/panel/panel-lvds.c @@ -244,7 +244,7 @@ static int panel_lvds_probe(struct platform_device *pdev) static int panel_lvds_remove(struct platform_device *pdev) { - struct panel_lvds *lvds = dev_get_drvdata(&pdev->dev); + struct panel_lvds *lvds = platform_get_drvdata(pdev); drm_panel_remove(&lvds->panel);