From patchwork Wed Jan 18 08:42:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ye.xingchen@zte.com.cn X-Patchwork-Id: 45118 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2235132wrn; Wed, 18 Jan 2023 01:34:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXvi5c5u9ow+YkAtjj14WH8Wg1JvFHTj2tU4iw4Ur0+O2bPeFOqNEmsFM6KEmWyZPYPP+VNc X-Received: by 2002:a05:6a20:3d86:b0:b8:d032:6486 with SMTP id s6-20020a056a203d8600b000b8d0326486mr6435503pzi.16.1674034469002; Wed, 18 Jan 2023 01:34:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674034468; cv=none; d=google.com; s=arc-20160816; b=Nz3i3zTJGTzqatq6BJj+pNlA1V52Z7XMc/M7PG6GB3TL+4GWVLlvOTiiNkYCQqkix7 AxTV1k0dECIBB+DjY5JyhrdooNKsyqPFFV5CH1CTGUH0Y4wqJa+KkPZbOZEEP+HZA2kZ OaMeXp+C1SQPIMbi0Npj5MS3n2T2RXSbm7MskxLm/nFID18oxb4fhhcBkmpX0W0kbRzm u8LbO5eRCQMyNp1QPTzbVzjIx80Ta7WhkYQD81TJedXSRmH5nICtptWV9SqKg/QUtmNq sw6+IdblzlmXTptsUujblO8YU6xJZRS/CsLKZtzIr+WgQHoJh8PgrIzKwYhtbgoispRM VU1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=z2JaSBtnvh7e7OpdDSOzhDuaMr81kjYpIpl3tay6JLs=; b=zHbmtT7Ym5vTHBFl4j64lZNtH/idvFz604SlLU0PtllAGbSxu/d+aubhZEzgG6qYgg ji1622x1UDrK1unWuDRikHu2v3MhWls02SC4TLZ/YzJeAjZRTsVmQlHRb21/TayvFQPF IORbz4N0gs/kT+vRcY5r0U/dXdZKNuaVwMmbMtHdIpcy2RSnYOTHNq5O/qY8duZRxRdY xvLIbJfHKdWEiT6IPiydBs1qih2SLX8bD8cQsd4ZW/p44FI4FC1zalOjy+UkPwg2uT/O xbgZBcnSPfcv6LW8s3v4Ewz5feXoWzSP4iCtGunDilWGkSsbEZc1C0UswahLX9/2hOYX 8Kjg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l186-20020a6391c3000000b004cfaa2993fasi3432327pge.293.2023.01.18.01.34.12; Wed, 18 Jan 2023 01:34:28 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230314AbjARJbS (ORCPT + 99 others); Wed, 18 Jan 2023 04:31:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230180AbjARJVP (ORCPT ); Wed, 18 Jan 2023 04:21:15 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5E2C5CFED; Wed, 18 Jan 2023 00:42:44 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4NxfQq34TGz508D2; Wed, 18 Jan 2023 16:42:43 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl2.zte.com.cn with SMTP id 30I8gdJq072264; Wed, 18 Jan 2023 16:42:39 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Wed, 18 Jan 2023 16:42:41 +0800 (CST) Date: Wed, 18 Jan 2023 16:42:41 +0800 (CST) X-Zmail-TransId: 2af963c7b10161418917 X-Mailer: Zmail v1.0 Message-ID: <202301181642412733780@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , Subject: =?utf-8?b?W1BBVENIXSB0aGVybWFsOiBraXJrd29vZDogVXNlwqBkZXZtX3BsYXRm?= =?utf-8?b?b3JtX2dldF9hbmRfaW9yZW1hcF9yZXNvdXJjZSgp?= X-MAIL: mse-fl2.zte.com.cn 30I8gdJq072264 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 63C7B103.000 by FangMail milter! X-FangMail-Envelope: 1674031363/4NxfQq34TGz508D2/63C7B103.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63C7B103.000/4NxfQq34TGz508D2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SPF_PERMERROR,UNPARSEABLE_RELAY 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755352367315605974?= X-GMAIL-MSGID: =?utf-8?q?1755352367315605974?= From: ye xingchen 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: ye xingchen --- drivers/thermal/kirkwood_thermal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/thermal/kirkwood_thermal.c b/drivers/thermal/kirkwood_thermal.c index 7fb6e476c82a..bec7ec20e79d 100644 --- a/drivers/thermal/kirkwood_thermal.c +++ b/drivers/thermal/kirkwood_thermal.c @@ -64,15 +64,13 @@ static int kirkwood_thermal_probe(struct platform_device *pdev) { struct thermal_zone_device *thermal = NULL; struct kirkwood_thermal_priv *priv; - struct resource *res; int ret; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->sensor = devm_ioremap_resource(&pdev->dev, res); + priv->sensor = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(priv->sensor)) return PTR_ERR(priv->sensor);