Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7367886ybp; Wed, 16 Oct 2019 07:41:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlzqTHzShWvyUkZh+RTWxGoSjPJ9DCgeCJr+O0EGv+gKJkO5eCptW3iEwOMXiB22E2AztF X-Received: by 2002:a50:fc86:: with SMTP id f6mr40015159edq.233.1571236889438; Wed, 16 Oct 2019 07:41:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571236889; cv=none; d=google.com; s=arc-20160816; b=t4VtmFWTLhNXxy7n8Ivrc8tyJeGWUNqiF1tZb0lpb/SjBUSFXv5UEGouFqezhS5+4j oTkk51vLZHiWj6B/jhAPJHIQqP+O1Ud4f3BDJhTjHXk5khuv5vOuLT3yUmbXvwMRfmjQ +6Zhjqd00Dp3xMHljCTCzSjweu/Lp6EUEGvrcgb7gKZKfjBy9LAIX6V/A4YtB98ymtuI AIst1W1lPlr43/uJeTKVwjvU7gD8Vy3WrY2XLamt5PAWXCGYCwRJYwBcio7AQIbivMcf O5cGu9DQOJzqmNOfaNsopJHTCvmnQeMuJm/jQUy9KYtSPegeYuURueC9KArnGb60Jt4n Sw0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=REoMXgloO5mjV/Q1yC87IRQVBBx9BHL5sh5zaRxoJAc=; b=G9I4h8sxc5IOnrH5J7AP+rEV0ab0wRfSXgH27QMXv1DiwVZ3v8mhZFrmiFEjS+ZbR1 +JaBLFTmpI5NnG5rVW0X0BjMRbNn0o/mRQiEmqK46ApFGgiAguX71D8dOjrW2zs1fRQe YDkAAUF/QBS8LEIp8TwV5VRY0KO8UEFIF13MGK4UNY5+iROMSO5NIGLD9zhjUc4WGOb+ llcSKbe/qO9JWUHo2gpShuo46vzYCMVvKTKGRydr2M1xMS3xoC5NiGvfaPKDZ7Qm5uEh Op4xmVHl5RtxBVlZ48nH+kLPni3Xj0Zqj1AYfAGydWBLOJz0nthsTvHl9V96mDIi3Ftd CE2Q== 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 r10si14711119edh.358.2019.10.16.07.41.06; Wed, 16 Oct 2019 07:41:29 -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 S2404727AbfJPKrM (ORCPT + 99 others); Wed, 16 Oct 2019 06:47:12 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3783 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404702AbfJPKrG (ORCPT ); Wed, 16 Oct 2019 06:47:06 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 97CE53AA7BC64B30075C; Wed, 16 Oct 2019 18:47:04 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Wed, 16 Oct 2019 18:46:57 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , CC: , , , , , , , YueHaibing Subject: [PATCH -next 10/13] hwrng: pic32 - use devm_platform_ioremap_resource() to simplify code Date: Wed, 16 Oct 2019 18:46:18 +0800 Message-ID: <20191016104621.26056-11-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20191016104621.26056-1-yuehaibing@huawei.com> References: <20191016104621.26056-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/char/hw_random/pic32-rng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/char/hw_random/pic32-rng.c b/drivers/char/hw_random/pic32-rng.c index 90f498c..81080cb 100644 --- a/drivers/char/hw_random/pic32-rng.c +++ b/drivers/char/hw_random/pic32-rng.c @@ -70,7 +70,6 @@ static int pic32_rng_read(struct hwrng *rng, void *buf, size_t max, static int pic32_rng_probe(struct platform_device *pdev) { struct pic32_rng *priv; - struct resource *res; u32 v; int ret; @@ -78,8 +77,7 @@ static int pic32_rng_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); -- 2.7.4