Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp7366629ybp; Wed, 16 Oct 2019 07:40:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqza0B3XqUWwkjFOc8BXPQesJXVoC+tlziNKVL7rBa6LgbzUL1wquaX1CLcNsBEsUFyb7Vie X-Received: by 2002:a05:6402:550:: with SMTP id i16mr40593512edx.102.1571236837256; Wed, 16 Oct 2019 07:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571236837; cv=none; d=google.com; s=arc-20160816; b=GXcMwoA7+6bbxtAkqyQSLtZq+8UkJnUU5X3eq6L1illXIn/OPsEOCoFSR7WAIL2Ari b9jGadOq9kKtbuIqY5ETYyZ3IEXOZ/6TZbbVBztyfnfQbdeSyd5DQvPCcxb1GfwnH87/ NYgQ+Y7Sg/nV0Pd7lXoeKNUDOQXqPnuIqQeYYAtUhIPmA1f0gm/F37EAYU8DptR6W00Y kEOWkcP/2XE6y9O51P0Dfnc/C9CZjXHSo9fTGR+JM+HNDuXm6nCsNRqWjEGE8RBpVUTf g4Uo1ivGLPJa5kkrPuluyalyAWHg3h4yXTxQ7Y1qblks8REvuUdSRmIyXgqr5UCyddEn 6lVw== 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=UxIwlY/wNsXAe4Rji6MQkvRFrc40u2w9GOMxh0/75lY=; b=YUJivXvVkwY76LBj9qSxPCGL13MsoGeO0lpwYl4Sc5PG6OAdBJgYsGRsAjRskcpAfN y6vcxBa+45gNdvpl770QEddDHvmyvOwZQkeNkvK3ITMez+tbf8ypeTgXrDDpvDasWM+X WS2V/IrYk8LFJFiX0sI4s2z72EzPnGhBJSqoHH6sLfQCEjH4v52IdciCsXIAxV5Rs5tJ FsX1bNcCdHBxVny8bqfuTcmJ3mQ8FbJBWjidhXt5WI4tyatadYJTfQq2esfweygCLNp3 iMWVR9wCeqLvPadmK27gTrB4XPeyZRrj25HBXSch2l2Hnc9ua7Wgh1yiSiTA4vLggx1Q ZSVw== 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 t49si18377986edd.198.2019.10.16.07.40.13; Wed, 16 Oct 2019 07:40:37 -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 S2404740AbfJPKrO (ORCPT + 99 others); Wed, 16 Oct 2019 06:47:14 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:44430 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404722AbfJPKrM (ORCPT ); Wed, 16 Oct 2019 06:47:12 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D622657E9FA331F7CEE7; Wed, 16 Oct 2019 18:47:04 +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:54 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , CC: , , , , , , , YueHaibing Subject: [PATCH -next 09/13] hwrng: pasemi - use devm_platform_ioremap_resource() to simplify code Date: Wed, 16 Oct 2019 18:46:17 +0800 Message-ID: <20191016104621.26056-10-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/pasemi-rng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c index 24b1460..2498d4e 100644 --- a/drivers/char/hw_random/pasemi-rng.c +++ b/drivers/char/hw_random/pasemi-rng.c @@ -86,10 +86,8 @@ static struct hwrng pasemi_rng = { static int rng_probe(struct platform_device *pdev) { void __iomem *rng_regs; - struct resource *res; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rng_regs = devm_ioremap_resource(&pdev->dev, res); + rng_regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rng_regs)) return PTR_ERR(rng_regs); -- 2.7.4