From patchwork Mon Mar 6 14:46:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Md Sadre Alam X-Patchwork-Id: 64777 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1906454wrd; Mon, 6 Mar 2023 07:32:47 -0800 (PST) X-Google-Smtp-Source: AK7set+WLfAKtawZeDDPJjdbihCLGLna3BlZDJRdsieJAx+OIC8rUuTzVjvbJt+xeJbXKhWBvWC3 X-Received: by 2002:a17:907:8a0a:b0:906:449c:e2e with SMTP id sc10-20020a1709078a0a00b00906449c0e2emr12178010ejc.34.1678116767447; Mon, 06 Mar 2023 07:32:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678116767; cv=none; d=google.com; s=arc-20160816; b=YTQMMZdsM8G5VwjnWqx489aDTfKjA5pnvfQRjwaJU41XtgPLGwVbACB/mc5RC3GmVm uYuoIMpYZvgeND57HBK68cG0g4rDccIsniI6a/WT42Xwr7TBrlUoZKmvEN+Qh43exbFy BLj6C3Lr9ub+0oO/9s/Wc+VA3i7ychM3T3ZU9Si+Va5hNUD8yv2tscFyjD1T9KYhPfws ktFnsWxCwPk2Ch3h7ayxbsetqrdMbZTvCyU/XW51n6JkeJcHbbir3xsog8hjg/rVQdR4 nLG/qCrXiKqb799lrbZHAXqdf9qqbRGxkUjVWeweXwdT8siJ9XK4yoExM2kK4V55thLH DFLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=5JRGOQbm0JBuLxYt4MzA6HybTg38jSMU6E2GDw++4aI=; b=OyP295xKe9mjCqpQgXi2Zp2RH3i0usi7re6HZHRXdYuxU7FW1qRIeQei7tcQ47V5tW IfqdOf19jORcjNXtApd67RsO+FIAZ4dyU4bGOJ7VVMszWQhiOqd3bOgxSnyuicQB9EF1 qm2nn0F9uejKWuo9ANpej2TlBtA6BdhJU7Xpha3GjjfIdeyF9woB8QjN9CD2i2GYKQHD fDVGsySuge/bwqNHoOl+izMgo/ZLUfdbCHIjXswFeXnmL5rOpd3TS6MJMer9K5bc3F+6 +mpa+wN8Yf04448N+IyWxTh/s0jQMYJhg7+5bamCGv5QXEqW5LhbVvu+R032DsyyU7za oE/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="YvcQA/w0"; 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 gh23-20020a170906e09700b008cdb0cd5e80si8104844ejb.107.2023.03.06.07.32.22; Mon, 06 Mar 2023 07:32:47 -0800 (PST) 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="YvcQA/w0"; 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 S230430AbjCFPAN (ORCPT + 99 others); Mon, 6 Mar 2023 10:00:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230408AbjCFPAL (ORCPT ); Mon, 6 Mar 2023 10:00:11 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEC052A9B6; Mon, 6 Mar 2023 07:00:07 -0800 (PST) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3266RFn2000531; Mon, 6 Mar 2023 14:46:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id; s=qcppdkim1; bh=5JRGOQbm0JBuLxYt4MzA6HybTg38jSMU6E2GDw++4aI=; b=YvcQA/w0B4Eh5GEtqz1bFrzdyRybeccuvt7or/616AUwSXvc/Amkmx7z16nh+ZMEH31j ahZKViNqmJuhXjGVofKRGcQ8II/Q4a/UwuBhrCcVd1zjaMsk5J61zjv8+pPoY/IYMfSD BLoiELGjaDdL2pelJC4fR1E32upGn5zW2PiOq6V2AQlU9mqrKKsFcB9awm3fOG8/niHi IeVIJ25M7TVK9eiXhov3z36vlnxaHDKUbNViO3OOnJ5RnYDS6uGcAiP45OlbN3ezMUOe AO8zYMEfqQeUFJiDTFCMAboZ+FkcxU7w1BfXHmUjTo/N4bKlkD5yAdQmSgrAvA302t9B Tw== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p417d4y1p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 14:46:46 +0000 Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 326EkheE017348; Mon, 6 Mar 2023 14:46:43 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3p4fft5j33-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 06 Mar 2023 14:46:43 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 326EfjQG011965; Mon, 6 Mar 2023 14:46:43 GMT Received: from mdalam-linux.qualcomm.com (mdalam-linux.qualcomm.com [10.201.2.71]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 326EkhVT017343; Mon, 06 Mar 2023 14:46:43 +0000 Received: by mdalam-linux.qualcomm.com (Postfix, from userid 466583) id 51EE712010CA; Mon, 6 Mar 2023 20:16:42 +0530 (IST) From: Md Sadre Alam To: andersson@kernel.org, agross@kernel.org, konrad.dybcio@linaro.org, linus.walleij@linaro.org, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: quic_sjaganat@quicinc.com, quic_srichara@quicinc.com, quic_varada@quicinc.com, quic_mdalam@quicinc.com Subject: [PATCH 4/5] pinctrl: qcom: Use devm_platform_get_and_ioremap_resource() Date: Mon, 6 Mar 2023 20:16:41 +0530 Message-Id: <20230306144641.21955-1-quic_mdalam@quicinc.com> X-Mailer: git-send-email 2.17.1 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: IYc9OB0druSbGCCo8z-rf0Daqc6MsuQj X-Proofpoint-ORIG-GUID: IYc9OB0druSbGCCo8z-rf0Daqc6MsuQj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_08,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 spamscore=0 malwarescore=0 bulkscore=0 mlxlogscore=656 phishscore=0 clxscore=1011 adultscore=0 priorityscore=1501 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060130 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE, SPF_NONE autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759632967851702869?= X-GMAIL-MSGID: =?utf-8?q?1759632967851702869?= Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Md Sadre Alam --- drivers/pinctrl/qcom/pinctrl-msm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index daeb79a9a602..e25e7b5cdda2 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -1480,8 +1480,7 @@ int msm_pinctrl_probe(struct platform_device *pdev, return PTR_ERR(pctrl->regs[i]); } } else { - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pctrl->regs[0] = devm_ioremap_resource(&pdev->dev, res); + pctrl->regs[0] = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(pctrl->regs[0])) return PTR_ERR(pctrl->regs[0]);