Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp61614pxj; Thu, 3 Jun 2021 00:32:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpLLylH238WMU3VT+R9vp3uZqcW1ZDZr4wU/k34mL+sUhR7lnNREIAE2dlp5HCmYSbLjal X-Received: by 2002:a17:906:988a:: with SMTP id zc10mr24973762ejb.62.1622705565223; Thu, 03 Jun 2021 00:32:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622705565; cv=none; d=google.com; s=arc-20160816; b=fr4LEdpbFRSu5K/BrfsBbC1+3LPzWQ7YfzShQIcm1OX36DFpTji1HDv52DoDKt2gTf NnvuMNt3Wc42ED4Ap31E9D/i/6kLT2yavG9Hw34wZi9EnvpCkRfWc/EKpueGsYtiWS+w ahtV97f8BiaLXaJEBc/BFPPJXcArSgjeTYjMWw8/2XnaqZfXG6r7aPJ2s1OnHK7H7Cuf RZoW8DOvATBR8CyYWkI7bSNtzly25gZbpStXDHXlMV1klanx+WHOEtKkQ2sldc9Jn3oc 6nlE55qg/EZr70NY6g5tL4LMeU9gQhudsmRQSqQtxQd2RHXRQDbjkGrzF+ufyseGaYWp s3Pw== 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 :message-id:date:subject:cc:to:from; bh=jX8D+2130cxvJIZqMj2BymBiPKLjdvF+pdpB+XMJc1A=; b=NIx5CoUIuu4bbxf7PCLUE50WOqvlgWaa+RsoBg+oQ5cpHH+es/JWREK255kv89iE37 UWgm6A4DrQdbTw7NWVfaiL3/lIzTTIKX0AzN/yPQMhmFrHX9jvYf9UjqmKXMKMDxzR74 FMnbBfWMZ2VF0Igq8iVY0z1ovzT6WbUG8+I9Vw/gsTkmbvicu8RJygXKkyrTdOS4vM2j x5aQLqAjdZTwpQfeKYVeQuD80R/kGN5HvSMrF6hCezPfAubY2v4kllKdXjc0jhOpOPLq 4YFhApqY5yA4V7OwWXKP6he0eareJvefP0W0KYkVDF9PkBE9ysfWxq0fUHKJdRp1cZSt gkxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r18si1763925edd.372.2021.06.03.00.31.58; Thu, 03 Jun 2021 00:32:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229697AbhFCHcJ (ORCPT + 99 others); Thu, 3 Jun 2021 03:32:09 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:7081 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbhFCHcI (ORCPT ); Thu, 3 Jun 2021 03:32:08 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4FwctJ6VJ7zYpmM; Thu, 3 Jun 2021 15:27:36 +0800 (CST) Received: from dggpeml500017.china.huawei.com (7.185.36.243) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 3 Jun 2021 15:30:19 +0800 Received: from huawei.com (10.175.103.91) by dggpeml500017.china.huawei.com (7.185.36.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 3 Jun 2021 15:30:18 +0800 From: Yang Yingliang To: , , CC: Subject: [PATCH -next] can: m_can: use devm_platform_ioremap_resource_byname Date: Thu, 3 Jun 2021 15:34:41 +0800 Message-ID: <20210603073441.2983497-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500017.china.huawei.com (7.185.36.243) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang --- drivers/net/can/m_can/m_can_platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can/m_can_platform.c index 599de0e08cd7..9f8f69aec993 100644 --- a/drivers/net/can/m_can/m_can_platform.c +++ b/drivers/net/can/m_can/m_can_platform.c @@ -80,8 +80,7 @@ static int m_can_plat_probe(struct platform_device *pdev) if (ret) goto probe_fail; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "m_can"); - addr = devm_ioremap_resource(&pdev->dev, res); + addr = devm_platform_ioremap_resource_byname(pdev, "m_can"); irq = platform_get_irq_byname(pdev, "int0"); if (IS_ERR(addr) || irq < 0) { ret = -EINVAL; -- 2.25.1