Message ID | 20230515030256.300104-3-quic_bjorande@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6630645vqo; Sun, 14 May 2023 20:14:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6VOqRrAzaTtEj41YQ/z8dqB6Vk37RDNZpYm8dEiy9WkN6+zNlBpMYTcymSY1ziHGSeQdhb X-Received: by 2002:a05:6a20:9187:b0:104:950f:fe15 with SMTP id v7-20020a056a20918700b00104950ffe15mr13095516pzd.55.1684120481064; Sun, 14 May 2023 20:14:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684120481; cv=none; d=google.com; s=arc-20160816; b=FTqBlszYThkiRCLwWPLXydIKnGes3KUYoiYIE4iiUcSu4dJrzDG3btdUCjTigy24Md 1qF6+8abHz6WUWC1xxUI4wJM0PDGmdmfqkmhJokmDs/Lg26a2+tpv/cdLlpe8sMVeQDb gpxDRlBzZQK/to0Ex/5RBTmRfWePR5sr8bg+07kXWjh7CCIMCGaz6MwCLtZ2PRt1XjXQ aCry7oXEV8QUuJOLiYY97b59KSVM1pkvaRXkj9hbdg2xx+ftdoNExHH0EYKH65rK7OKp LnYtkIvg4muz+DkCOuVK7HDsdoa2pFzZmV+UZyiOibb9o9ArqYQfyK+gH2gtzHfpJk00 XPqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2PieqsEAV4sxv39i1McboDZR6TpeKwDnoJxMYkJ2cIw=; b=SwfRa5DIgxOwEAod4T7FHY2HTM9IClOm4cH+o2Mao1H12eUiZwwGfEshI8ZPu98P50 66CezMefzXObIF/6GY52cI4Q/t+8x5RuYzt7E1EzsGD6+DcWNaOuouzaySqJLE/o1zVU duTJGYFFYG6BbO61IpxJXgdkEuzlLbR9FD6zaIlxaX8TT2S1+QMHbhIJV13aQfSzuYqX SdNER0CiDU6yiie/tqzQvzP/x0DcsFoweE/bjV6z0G3tWoLTD4jAEVcCaHA0M9sLlmwv ZpPGeESExO79eXXKZQjsw9+pq9LXnSybt2YKHIaHM/UpanQPLbkP7DIJvk3FNxJkrzoe s7Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CbXNuhis; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u28-20020a63b55c000000b0052c61f69c23si15041568pgo.422.2023.05.14.20.14.26; Sun, 14 May 2023 20:14:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CbXNuhis; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236152AbjEODDV (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Sun, 14 May 2023 23:03:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbjEODDO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 14 May 2023 23:03:14 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20CC710C8; Sun, 14 May 2023 20:03:09 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34F2u0Hg012814; Mon, 15 May 2023 03:03:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=2PieqsEAV4sxv39i1McboDZR6TpeKwDnoJxMYkJ2cIw=; b=CbXNuhiscsWVSeC/jxPNK8L9bekJj6vl/H7E6C+ibc5qlO8mFNcJPPyaE5XnlQMPtbs8 +JPmyxQgJAmnDC4zBTcOoanGKOg20CP8rRFkBfGaPN4IUExeTuixs4KtNNRioyuexOTf v2LwqfqPWysZ5HYXgXFUal6+WmMUkAcAcVg9QMoowxVgHNdoseGdo40RiSNBFmQejGZQ gZOwHhTFGFC0QrklNl3tbx61XZSDKUIwPInDEtpcolJSqDYDWVhDf4HXr/aLKJF/aLKK L6pQV3vvX1apqBINOJJ9h0k3kxDFTtYg3HxgEvhPh6xytVXYBuk6LZjR6WhCQTklwNnJ mA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qj1gxtnn7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 May 2023 03:03:03 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34F3337V030193 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 May 2023 03:03:03 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Sun, 14 May 2023 20:03:02 -0700 From: Bjorn Andersson <quic_bjorande@quicinc.com> To: Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Kuogee Hsieh <quic_khsieh@quicinc.com> CC: Johan Hovold <johan+linaro@kernel.org>, Vinod Polimera <quic_vpolimer@quicinc.com>, Sankeerth Billakanti <quic_sbillaka@quicinc.com>, <linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>, <dri-devel@lists.freedesktop.org>, <freedreno@lists.freedesktop.org> Subject: [PATCH 3/3] drm/msm/dp: Clean up pdev/dev duplication in dp_power Date: Sun, 14 May 2023 20:02:56 -0700 Message-ID: <20230515030256.300104-3-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230515030256.300104-1-quic_bjorande@quicinc.com> References: <20230515030256.300104-1-quic_bjorande@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: IH7g2MK2smO5TxVH9_N9SXfw7d4BmASx X-Proofpoint-ORIG-GUID: IH7g2MK2smO5TxVH9_N9SXfw7d4BmASx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-14_18,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 malwarescore=0 spamscore=0 clxscore=1015 mlxlogscore=999 priorityscore=1501 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305150024 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765928317367113278?= X-GMAIL-MSGID: =?utf-8?q?1765928317367113278?= |
Series |
[1/3] drm/msm/dp: Drop now unused dp_hpd module
|
|
Commit Message
Bjorn Andersson
May 15, 2023, 3:02 a.m. UTC
The dp_power module keeps track of both the DP controller's struct
platform_device and struct device - with the prior pulled out of the
dp_parser module.
Clean up the duplication by dropping the platform_device reference and
just track the passed struct device.
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
drivers/gpu/drm/msm/dp/dp_power.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
Comments
On 15/05/2023 06:02, Bjorn Andersson wrote: > The dp_power module keeps track of both the DP controller's struct > platform_device and struct device - with the prior pulled out of the > dp_parser module. > > Clean up the duplication by dropping the platform_device reference and > just track the passed struct device. > > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > --- > drivers/gpu/drm/msm/dp/dp_power.c | 16 +++++++--------- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dp/dp_power.c b/drivers/gpu/drm/msm/dp/dp_power.c > index 031d2eefef07..9be645f91211 100644 > --- a/drivers/gpu/drm/msm/dp/dp_power.c > +++ b/drivers/gpu/drm/msm/dp/dp_power.c > @@ -14,7 +14,6 @@ > > struct dp_power_private { > struct dp_parser *parser; > - struct platform_device *pdev; > struct device *dev; > struct drm_device *drm_dev; > struct clk *link_clk_src; > @@ -28,7 +27,7 @@ static int dp_power_clk_init(struct dp_power_private *power) > { > int rc = 0; > struct dss_module_power *core, *ctrl, *stream; > - struct device *dev = &power->pdev->dev; > + struct device *dev = power->dev; > > core = &power->parser->mp[DP_CORE_PM]; > ctrl = &power->parser->mp[DP_CTRL_PM]; > @@ -153,7 +152,7 @@ int dp_power_client_init(struct dp_power *dp_power) > > power = container_of(dp_power, struct dp_power_private, dp_power); > > - pm_runtime_enable(&power->pdev->dev); > + pm_runtime_enable(power->dev); > > return dp_power_clk_init(power); > } > @@ -164,7 +163,7 @@ void dp_power_client_deinit(struct dp_power *dp_power) > > power = container_of(dp_power, struct dp_power_private, dp_power); > > - pm_runtime_disable(&power->pdev->dev); > + pm_runtime_disable(power->dev); > } > > int dp_power_init(struct dp_power *dp_power, bool flip) > @@ -174,11 +173,11 @@ int dp_power_init(struct dp_power *dp_power, bool flip) > > power = container_of(dp_power, struct dp_power_private, dp_power); > > - pm_runtime_get_sync(&power->pdev->dev); > + pm_runtime_get_sync(power->dev); > > rc = dp_power_clk_enable(dp_power, DP_CORE_PM, true); > if (rc) > - pm_runtime_put_sync(&power->pdev->dev); > + pm_runtime_put_sync(power->dev); > > return rc; > } > @@ -190,7 +189,7 @@ int dp_power_deinit(struct dp_power *dp_power) > power = container_of(dp_power, struct dp_power_private, dp_power); > > dp_power_clk_enable(dp_power, DP_CORE_PM, false); > - pm_runtime_put_sync(&power->pdev->dev); > + pm_runtime_put_sync(power->dev); > return 0; > } > > @@ -199,12 +198,11 @@ struct dp_power *dp_power_get(struct device *dev, struct dp_parser *parser) Technically we don't even need to pass struct device here, we can get it from parser->pdev->dev. > struct dp_power_private *power; > struct dp_power *dp_power; > > - power = devm_kzalloc(&parser->pdev->dev, sizeof(*power), GFP_KERNEL); > + power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL); > if (!power) > return ERR_PTR(-ENOMEM); > > power->parser = parser; > - power->pdev = parser->pdev; > power->dev = dev; > > dp_power = &power->dp_power;
On Sat, May 20, 2023 at 04:26:59AM +0300, Dmitry Baryshkov wrote: > On 15/05/2023 06:02, Bjorn Andersson wrote: > > The dp_power module keeps track of both the DP controller's struct > > platform_device and struct device - with the prior pulled out of the > > dp_parser module. > > > > Clean up the duplication by dropping the platform_device reference and > > just track the passed struct device. > > > > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > > --- > > drivers/gpu/drm/msm/dp/dp_power.c | 16 +++++++--------- > > 1 file changed, 7 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/gpu/drm/msm/dp/dp_power.c b/drivers/gpu/drm/msm/dp/dp_power.c > > index 031d2eefef07..9be645f91211 100644 > > --- a/drivers/gpu/drm/msm/dp/dp_power.c > > +++ b/drivers/gpu/drm/msm/dp/dp_power.c > > @@ -14,7 +14,6 @@ > > struct dp_power_private { > > struct dp_parser *parser; > > - struct platform_device *pdev; > > struct device *dev; > > struct drm_device *drm_dev; > > struct clk *link_clk_src; > > @@ -28,7 +27,7 @@ static int dp_power_clk_init(struct dp_power_private *power) > > { > > int rc = 0; > > struct dss_module_power *core, *ctrl, *stream; > > - struct device *dev = &power->pdev->dev; > > + struct device *dev = power->dev; > > core = &power->parser->mp[DP_CORE_PM]; > > ctrl = &power->parser->mp[DP_CTRL_PM]; > > @@ -153,7 +152,7 @@ int dp_power_client_init(struct dp_power *dp_power) > > power = container_of(dp_power, struct dp_power_private, dp_power); > > - pm_runtime_enable(&power->pdev->dev); > > + pm_runtime_enable(power->dev); > > return dp_power_clk_init(power); > > } > > @@ -164,7 +163,7 @@ void dp_power_client_deinit(struct dp_power *dp_power) > > power = container_of(dp_power, struct dp_power_private, dp_power); > > - pm_runtime_disable(&power->pdev->dev); > > + pm_runtime_disable(power->dev); > > } > > int dp_power_init(struct dp_power *dp_power, bool flip) > > @@ -174,11 +173,11 @@ int dp_power_init(struct dp_power *dp_power, bool flip) > > power = container_of(dp_power, struct dp_power_private, dp_power); > > - pm_runtime_get_sync(&power->pdev->dev); > > + pm_runtime_get_sync(power->dev); > > rc = dp_power_clk_enable(dp_power, DP_CORE_PM, true); > > if (rc) > > - pm_runtime_put_sync(&power->pdev->dev); > > + pm_runtime_put_sync(power->dev); > > return rc; > > } > > @@ -190,7 +189,7 @@ int dp_power_deinit(struct dp_power *dp_power) > > power = container_of(dp_power, struct dp_power_private, dp_power); > > dp_power_clk_enable(dp_power, DP_CORE_PM, false); > > - pm_runtime_put_sync(&power->pdev->dev); > > + pm_runtime_put_sync(power->dev); > > return 0; > > } > > @@ -199,12 +198,11 @@ struct dp_power *dp_power_get(struct device *dev, struct dp_parser *parser) > > Technically we don't even need to pass struct device here, we can get it > from parser->pdev->dev. > Right, but afaict dp_init_sub_modules() passes struct device * as first parameter to all the "module" initializers. So it feels reasonable to keep it, for now, for symmetry. What do you think? Regards, Bjorn > > struct dp_power_private *power; > > struct dp_power *dp_power; > > - power = devm_kzalloc(&parser->pdev->dev, sizeof(*power), GFP_KERNEL); > > + power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL); > > if (!power) > > return ERR_PTR(-ENOMEM); > > power->parser = parser; > > - power->pdev = parser->pdev; > > power->dev = dev; > > dp_power = &power->dp_power; > > -- > With best wishes > Dmitry >
On 21/05/2023 06:53, Bjorn Andersson wrote: > On Sat, May 20, 2023 at 04:26:59AM +0300, Dmitry Baryshkov wrote: >> On 15/05/2023 06:02, Bjorn Andersson wrote: >>> The dp_power module keeps track of both the DP controller's struct >>> platform_device and struct device - with the prior pulled out of the >>> dp_parser module. >>> >>> Clean up the duplication by dropping the platform_device reference and >>> just track the passed struct device. >>> >>> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> >>> --- >>> drivers/gpu/drm/msm/dp/dp_power.c | 16 +++++++--------- >>> 1 file changed, 7 insertions(+), 9 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/msm/dp/dp_power.c b/drivers/gpu/drm/msm/dp/dp_power.c >>> index 031d2eefef07..9be645f91211 100644 >>> --- a/drivers/gpu/drm/msm/dp/dp_power.c >>> +++ b/drivers/gpu/drm/msm/dp/dp_power.c >>> @@ -14,7 +14,6 @@ >>> struct dp_power_private { >>> struct dp_parser *parser; >>> - struct platform_device *pdev; >>> struct device *dev; >>> struct drm_device *drm_dev; >>> struct clk *link_clk_src; >>> @@ -28,7 +27,7 @@ static int dp_power_clk_init(struct dp_power_private *power) >>> { >>> int rc = 0; >>> struct dss_module_power *core, *ctrl, *stream; >>> - struct device *dev = &power->pdev->dev; >>> + struct device *dev = power->dev; >>> core = &power->parser->mp[DP_CORE_PM]; >>> ctrl = &power->parser->mp[DP_CTRL_PM]; >>> @@ -153,7 +152,7 @@ int dp_power_client_init(struct dp_power *dp_power) >>> power = container_of(dp_power, struct dp_power_private, dp_power); >>> - pm_runtime_enable(&power->pdev->dev); >>> + pm_runtime_enable(power->dev); >>> return dp_power_clk_init(power); >>> } >>> @@ -164,7 +163,7 @@ void dp_power_client_deinit(struct dp_power *dp_power) >>> power = container_of(dp_power, struct dp_power_private, dp_power); >>> - pm_runtime_disable(&power->pdev->dev); >>> + pm_runtime_disable(power->dev); >>> } >>> int dp_power_init(struct dp_power *dp_power, bool flip) >>> @@ -174,11 +173,11 @@ int dp_power_init(struct dp_power *dp_power, bool flip) >>> power = container_of(dp_power, struct dp_power_private, dp_power); >>> - pm_runtime_get_sync(&power->pdev->dev); >>> + pm_runtime_get_sync(power->dev); >>> rc = dp_power_clk_enable(dp_power, DP_CORE_PM, true); >>> if (rc) >>> - pm_runtime_put_sync(&power->pdev->dev); >>> + pm_runtime_put_sync(power->dev); >>> return rc; >>> } >>> @@ -190,7 +189,7 @@ int dp_power_deinit(struct dp_power *dp_power) >>> power = container_of(dp_power, struct dp_power_private, dp_power); >>> dp_power_clk_enable(dp_power, DP_CORE_PM, false); >>> - pm_runtime_put_sync(&power->pdev->dev); >>> + pm_runtime_put_sync(power->dev); >>> return 0; >>> } >>> @@ -199,12 +198,11 @@ struct dp_power *dp_power_get(struct device *dev, struct dp_parser *parser) >> >> Technically we don't even need to pass struct device here, we can get it >> from parser->pdev->dev. >> > > Right, but afaict dp_init_sub_modules() passes struct device * as first > parameter to all the "module" initializers. So it feels reasonable to > keep it, for now, for symmetry. > > What do you think? Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff --git a/drivers/gpu/drm/msm/dp/dp_power.c b/drivers/gpu/drm/msm/dp/dp_power.c index 031d2eefef07..9be645f91211 100644 --- a/drivers/gpu/drm/msm/dp/dp_power.c +++ b/drivers/gpu/drm/msm/dp/dp_power.c @@ -14,7 +14,6 @@ struct dp_power_private { struct dp_parser *parser; - struct platform_device *pdev; struct device *dev; struct drm_device *drm_dev; struct clk *link_clk_src; @@ -28,7 +27,7 @@ static int dp_power_clk_init(struct dp_power_private *power) { int rc = 0; struct dss_module_power *core, *ctrl, *stream; - struct device *dev = &power->pdev->dev; + struct device *dev = power->dev; core = &power->parser->mp[DP_CORE_PM]; ctrl = &power->parser->mp[DP_CTRL_PM]; @@ -153,7 +152,7 @@ int dp_power_client_init(struct dp_power *dp_power) power = container_of(dp_power, struct dp_power_private, dp_power); - pm_runtime_enable(&power->pdev->dev); + pm_runtime_enable(power->dev); return dp_power_clk_init(power); } @@ -164,7 +163,7 @@ void dp_power_client_deinit(struct dp_power *dp_power) power = container_of(dp_power, struct dp_power_private, dp_power); - pm_runtime_disable(&power->pdev->dev); + pm_runtime_disable(power->dev); } int dp_power_init(struct dp_power *dp_power, bool flip) @@ -174,11 +173,11 @@ int dp_power_init(struct dp_power *dp_power, bool flip) power = container_of(dp_power, struct dp_power_private, dp_power); - pm_runtime_get_sync(&power->pdev->dev); + pm_runtime_get_sync(power->dev); rc = dp_power_clk_enable(dp_power, DP_CORE_PM, true); if (rc) - pm_runtime_put_sync(&power->pdev->dev); + pm_runtime_put_sync(power->dev); return rc; } @@ -190,7 +189,7 @@ int dp_power_deinit(struct dp_power *dp_power) power = container_of(dp_power, struct dp_power_private, dp_power); dp_power_clk_enable(dp_power, DP_CORE_PM, false); - pm_runtime_put_sync(&power->pdev->dev); + pm_runtime_put_sync(power->dev); return 0; } @@ -199,12 +198,11 @@ struct dp_power *dp_power_get(struct device *dev, struct dp_parser *parser) struct dp_power_private *power; struct dp_power *dp_power; - power = devm_kzalloc(&parser->pdev->dev, sizeof(*power), GFP_KERNEL); + power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL); if (!power) return ERR_PTR(-ENOMEM); power->parser = parser; - power->pdev = parser->pdev; power->dev = dev; dp_power = &power->dp_power;