Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3285836yba; Tue, 23 Apr 2019 00:42:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfLME8yagyQI0u2Yh7vR33cC7KCppIR2ZzSGyYcl+Q/0vyUEluMtGcESl1qfOoor9CQGI/ X-Received: by 2002:a63:cd50:: with SMTP id a16mr4589142pgj.394.1556005356775; Tue, 23 Apr 2019 00:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556005356; cv=none; d=google.com; s=arc-20160816; b=mnIcH4zO17gqMOVw7yaW52Jl2rQfFNLD/Oi+2IjfPGUOvaimBeaDKB4uG+jZQWEL7W IN+o4KEqhFs6BWPPpXv8HQD6uZpOq2d9chhRQvgnIVV5n4KbPKWQjpMFYBG+q2qTON0q buE1nDdIS77kn2MiF/+VfQvxQeP6SdI9HxH1+Crg9AmnYg596Xc33ojiLKhPU77CLbvK CdXn2VNL5usdeP4Tx9RS1aDYQ5q3mPxCRgYEMuPpHsOCMZ6kxLSXpPAAuS8uc7vUgVJi ZsdjpMCaMXYK0Q2eXq6YolrFztXOT1Fi18K8G39wxa+ZZTJHzA4FZ65zoVjPbjGOWeeS v0rw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2vv4ZZhP+YtfZKBGmwgX9Le0ZvOQJjZuFu3c8uKfYgA=; b=rQRCJqMoygDmDr9DZ/Pi+ox1UOOYKaHHWrvK3ERwrZjxm9ZJHq1jdcWhpSpDi3on3s OO7v6P3M1LK+y9L0dsVmQbou0tqLiXYcyoMZnMK0fMWE0w7nH8weZxl5hukr3dZi0nHs j9+0Ce0fJe0u9iNdMNJjSa7AdhZIBujVxnuUHXHHOB1yfImMaCmZBT3fTToN1N1l+mXN o4TFQjnj03JHLzhR9bccXI15fz4al8C2M8KdkpmH7eyxERk1mTgAQMVM1wxmUoMdP/wX j/B5wLeDSmGmtC0alC1ssG9FK6FqQwGie5Rgc6FWI1n2E2dtu6uSlrdl4WpSpaMuUIE7 9CZg== 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 b128si16488679pfb.141.2019.04.23.00.42.21; Tue, 23 Apr 2019 00:42:36 -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 S1726945AbfDWHk6 (ORCPT + 99 others); Tue, 23 Apr 2019 03:40:58 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7229 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726715AbfDWHkZ (ORCPT ); Tue, 23 Apr 2019 03:40:25 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 581006EB7F09602779C8; Tue, 23 Apr 2019 15:40:22 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 15:40:14 +0800 From: Kefeng Wang To: CC: Masahiro Yamada , Kefeng Wang , Rui Miguel Silva , "Steve Longerbeam" , Philipp Zabel , NXP Linux Team , Subject: [PATCH next 22/25] media: staging/imx7: Use dev_get_drvdata() Date: Tue, 23 Apr 2019 15:50:17 +0800 Message-ID: <20190423075020.173734-23-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423075020.173734-1-wangkefeng.wang@huawei.com> References: <20190423075020.173734-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using dev_get_drvdata directly. Cc: Rui Miguel Silva Cc: Steve Longerbeam Cc: Philipp Zabel Cc: NXP Linux Team Cc: linux-media@vger.kernel.org Signed-off-by: Kefeng Wang --- drivers/staging/media/imx/imx7-mipi-csis.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index 6cae2960eea1..19455f425416 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -1027,8 +1027,7 @@ static int mipi_csis_probe(struct platform_device *pdev) static int mipi_csis_pm_suspend(struct device *dev, bool runtime) { - struct platform_device *pdev = to_platform_device(dev); - struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev); + struct v4l2_subdev *mipi_sd = dev_get_drvdata(dev); struct csi_state *state = mipi_sd_to_csis_state(mipi_sd); int ret = 0; @@ -1052,8 +1051,7 @@ static int mipi_csis_pm_suspend(struct device *dev, bool runtime) static int mipi_csis_pm_resume(struct device *dev, bool runtime) { - struct platform_device *pdev = to_platform_device(dev); - struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev); + struct v4l2_subdev *mipi_sd = dev_get_drvdata(dev); struct csi_state *state = mipi_sd_to_csis_state(mipi_sd); int ret = 0; -- 2.20.1