Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7358706ybp; Wed, 16 Oct 2019 07:34:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLmtkse62+ookp4Luyw+V4KSgmI/+UN6pGSj4J+qZegUzKfLklIcx0ACZ7TtpD6RThntKL X-Received: by 2002:a17:907:20c8:: with SMTP id qq8mr39745339ejb.311.1571236495415; Wed, 16 Oct 2019 07:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571236495; cv=none; d=google.com; s=arc-20160816; b=KQQW14DSajEzLtVzNHuaGhwftkuVHDN06mqStcIAjpyetTIDEGWWhnSC+IN0IUVRkt 5spJBwo1uPhsv0LiWLjA/c3EyjAC2nrw05wEkgk+JBpwLtjytjEy9f8umBYypVpCLRUR Jtj7zLoBYqvtQyCneIYFzfW8zWh2yYW34EBFrDaVwo5MKNhiJBQn1ZHysLHsCgpDSvED 0qA1pA3EUYhvUGUPKn8P1mg7BEdj3m78CClxoP/O+L2HNBOg1iAu0t8vELeXXQdN4Y5l RrutxxSiPczloL/Z3WFzrpCGHUrb87yxzAL7opY26hV5kEqQPUIAruKPx2nMMkGv0Wkl nysw== 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=gxJYZXJ/bqboBBzwlWWsSKV32g1NVYMGysJaXMy4iug=; b=bLLiUMEU67Ik14cRNrag6pd5WKmNBXue0VxHG9L4tnedYroP7SN2kpGSGcsQio07jX YdA5pQ2Nq5YnEHCcWI7cFRLnuY2nX1QPBxnAKw3YiykFZNp+HJWxemA8JMr4us9D4ULP GWDZ3k2cpdQS/QsLNPM3LzAtgS6XRB+FyocWRs12/z0kCtMt8IntBO8lYhC49ySjJyMI hiSEa5A6Cm5p0gWlgY0zYC4Bbe7rYApJPXoyuDgxj5aAYqgaPxiiIxE6eb7puHQVwnsC eRLC7e3qh/QLvWrAA0Tz5rjhHx/+kT2NhSLwiqtC+MDtMppEMtXcCbxeWOnPRk+Xd9Ay igPQ== 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 a54si15583696edc.333.2019.10.16.07.34.31; Wed, 16 Oct 2019 07:34:55 -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 S2392542AbfJPKqs (ORCPT + 99 others); Wed, 16 Oct 2019 06:46:48 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3781 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2392449AbfJPKqr (ORCPT ); Wed, 16 Oct 2019 06:46:47 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8B09BB85DC26B4258360; Wed, 16 Oct 2019 18:46:44 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Wed, 16 Oct 2019 18:46:36 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , CC: , , , , , , , YueHaibing Subject: [PATCH -next 01/13] hwrng: atmel - use devm_platform_ioremap_resource() to simplify code Date: Wed, 16 Oct 2019 18:46:09 +0800 Message-ID: <20191016104621.26056-2-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/atmel-rng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c index e557057..b3138ec2 100644 --- a/drivers/char/hw_random/atmel-rng.c +++ b/drivers/char/hw_random/atmel-rng.c @@ -62,15 +62,13 @@ static void atmel_trng_disable(struct atmel_trng *trng) static int atmel_trng_probe(struct platform_device *pdev) { struct atmel_trng *trng; - struct resource *res; int ret; trng = devm_kzalloc(&pdev->dev, sizeof(*trng), GFP_KERNEL); if (!trng) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - trng->base = devm_ioremap_resource(&pdev->dev, res); + trng->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(trng->base)) return PTR_ERR(trng->base); -- 2.7.4