Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp619949ybi; Wed, 17 Jul 2019 02:14:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrRWfQUha+ot4GPAf/1houccXf1CgfAD+F13nddCqF831YtCJmY3f6u91NacSI580Nb/Jo X-Received: by 2002:a17:902:ff05:: with SMTP id f5mr40570969plj.116.1563354872033; Wed, 17 Jul 2019 02:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563354872; cv=none; d=google.com; s=arc-20160816; b=t/bgXDHcetJeYDLGnG+d72uFgG81+dBPFc40+6Jah33JvXhpZvQz7YBsaEQHz/jRyy G9yezjs/oXOZFBar8qMBPh5CB1Zjft9BYRJj3NB2CNR00855ESXF0U1iajHmgDpeERX1 RbFpUk+o8W2QuKyo0/DQ7a6fYLG4B68vTVIwgUvg2tROdsTbbZ9xJ0jr6bFVbsImBFSX hzRV09YUDVGz+rYM8Y//yLAVZr3ucHy6vl0pL9okJPcORgOwWPItDtdNmg8pVzV7v3MZ 9p/2tUWPyUSAGEsSG+8kM//VJiUXUVX+aBqeBU4LhV83/P+OaxOPIU2+qUzBGpMvasgC 2cbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=DU2HYhejfCH/Gw/XbXs3+4I1LnYJJMImK4Ywq40zKVU=; b=u63nv8P420ayxD9A3fN1whmb6WJur1neDwRQ6nURMwe3zGaeEqsOOvqws1z/il9FIY 5MyjeXQFzx7Spzn13oI3uHpgegChPVf/ecZMsbwUAVv0Hf5lPcQSLY6T+UUbcVCiKhLa wTo06X6FK7cQX8DVaGXr0unHhEUzVyK65w9S/6tKUndocFeNEpJuJ3kk57cSOm5gTELJ nDe1wrNMpsxFCJX5TKjPulKswjPbBZJqbyurRJsXEZP7+6liuir31hFtKC0mTtH7QkpL F0fR+NbRPCEaVK1cCFZai1X+Q4p+HVPFuDNb76IfHBKkLed/dCJvbXBivRFDGAhp9+lh tknw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3si21866980pld.102.2019.07.17.02.14.09; Wed, 17 Jul 2019 02:14:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725948AbfGQJOG (ORCPT + 99 others); Wed, 17 Jul 2019 05:14:06 -0400 Received: from inva021.nxp.com ([92.121.34.21]:56070 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725799AbfGQJOF (ORCPT ); Wed, 17 Jul 2019 05:14:05 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 3219120005C; Wed, 17 Jul 2019 11:14:04 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id F185E20005E; Wed, 17 Jul 2019 11:13:55 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D2E4F402C3; Wed, 17 Jul 2019 17:13:45 +0800 (SGT) From: Anson.Huang@nxp.com To: mpm@selenic.com, herbert@gondor.apana.org.au, arnd@arndb.de, gregkh@linuxfoundation.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, rfontana@redhat.com, allison@lohutok.net, kstewart@linuxfoundation.org, tglx@linutronix.de, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH 1/2] char: hw_random: imx-rngc: use devm_platform_ioremap_resource() to simplify code Date: Wed, 17 Jul 2019 17:04:37 +0800 Message-Id: <20190717090438.31522-1-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.9.5 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Anson Huang Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang --- drivers/char/hw_random/imx-rngc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c index 69f5379..30cf00f 100644 --- a/drivers/char/hw_random/imx-rngc.c +++ b/drivers/char/hw_random/imx-rngc.c @@ -196,7 +196,6 @@ static int imx_rngc_init(struct hwrng *rng) static int imx_rngc_probe(struct platform_device *pdev) { struct imx_rngc *rngc; - struct resource *res; int ret; int irq; @@ -204,8 +203,7 @@ static int imx_rngc_probe(struct platform_device *pdev) if (!rngc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rngc->base = devm_ioremap_resource(&pdev->dev, res); + rngc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rngc->base)) return PTR_ERR(rngc->base); -- 2.7.4