Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp261107ybl; Wed, 4 Dec 2019 02:16:58 -0800 (PST) X-Google-Smtp-Source: APXvYqw9lHaaS9T41B9e+cdEWr832jUaP0xPZTaQiC7HIBNpcICXBIKY6GCxyXcCTlUc0PAR1Saa X-Received: by 2002:aca:220c:: with SMTP id b12mr1804889oic.55.1575454618307; Wed, 04 Dec 2019 02:16:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1575454618; cv=pass; d=google.com; s=arc-20160816; b=HghNP4teRob9yJ5hcl4EZkopdhLZl9oc8ckJUGxcu0C6mQn5CXysn/CPstcl5CkQCQ Bywc4uKMg9Ki1JglldaRMPDAQlB0cuENpjDpzfye/nBAIGrIyqKx91xsLAYi4XBw7dU9 GObgndeeI94+cQrhGuM1ZrG/t6QkuE3NxDUnd87P9qfwTdzckZeHEhcOjWqqpDhKhIpQ lPQkOLFhHw/A2PtqN/PBr2KisBVVRvm+5aBw+EG/LTB767urEbLWUkPmVrUPHQM8/mKp k+edtLqjP+cF6La8fjP7w/7GM1JjNUfw5GUZtJOZ9+azHPOlXPCgzYYemapeTkIoFRju qpSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=U0g7+wVaxCT4BL0eA5hYKi+ApQuWHuHAggNhic9ms+0=; b=EzqaekWflbjQtmj9v9CnJ9Ex91x9TgcaTj50X5mRFVlNWam/Gnvzwz0+EutzWT5qY4 KiX4Ee/AQB69vMBQDeiysu0GoazazzxYMbFRx1U286rXsAMywemQ3tZjAV3PfGUPU09M BgSxqaC+CUBz+Qmjkd867rpk5mL5Om6oefngjdLOkAfG7A/CPIussiGzo8VM34pzuNBj zfuJWvazx/IiGkPRWQT2rwukRa6mQ7e8H5VAbNz3p7Xa+jqQ8JAWI80khqg6BBlOySo2 WfmCY0hFHZ4tOfXtxg6lSNj/FIZXr5E0xl+sNcuCfPf9wS1Bls5hJIXDoeBb4b56Zqqb L+3A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=pIp91el2; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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; dmarc=pass (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 h11si3149898otr.197.2019.12.04.02.16.46; Wed, 04 Dec 2019 02:16:58 -0800 (PST) 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; dkim=pass header.i=@nxp.com header.s=selector2 header.b=pIp91el2; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727571AbfLDKOu (ORCPT + 99 others); Wed, 4 Dec 2019 05:14:50 -0500 Received: from mail-eopbgr70053.outbound.protection.outlook.com ([40.107.7.53]:22069 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727268AbfLDKOu (ORCPT ); Wed, 4 Dec 2019 05:14:50 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dE35T5DiSl8TIrF8C4Pkkp7QhE3X2lyzC+1YDwP8lHsa+ysXypIDjS/LcKYSgz9mAK86B7epD0hwWX6SBjjARFdoSH+1M+wuMzNwz+YlTgz8lTU2d9NrHMYh9yrttLWo4BTYjXIEnIu3aP92npyPbniWT0zqAYk/tfF/xghbGf/RgpLudd5Ag1S+S8mXkwg2Z0xOIQCW7oIEUInf9tRKfl9e+PwWwU9D4vftnWee1jHzfZbzInG80SaBmQz2IME2cRioxVGz9KDEE3T97XQDRmLq1UWj9uOdu2+7kEhjTtcJanbt1qcd9NYWjkZBjJsayuWEAsnC7DRsg2VtTtRJeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U0g7+wVaxCT4BL0eA5hYKi+ApQuWHuHAggNhic9ms+0=; b=mtBIRYsxjyfT5ER7cUpGecOO/APMejNOwKOPX8r8iRfEra2hjc1ldEiSd9ZBq9K9Kq/psfMI4U5VN33vPsWR7Je6L821vsvzvp4dbENQYOieFXqzRYM+lJFTtoIevLRDa8cFg78dBi525KFqSM0yBgww4WQuCmOTEa5C+v+3HI9B3ABjIiyMlzWbbRBL+2+jAQBxRXEV/uw39nbEYMrT0W/OoCVacIKSVQOmLkoRJ065T83W05CU6kolDpVLzMqfIutE15wv+p4fW0r70BZdoA3+9uoP7ui67a3mh/y/7E92K9NLm+wv3/6oFuhV9duYx7MmnDA9CXHcZqGyHLptiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U0g7+wVaxCT4BL0eA5hYKi+ApQuWHuHAggNhic9ms+0=; b=pIp91el2bgvkJMaoBGRQ4LrTUGWqQLAhiNiVRwjLmT91G3O1uIh68DS48Gj/AgZbbZAGcXpS/2TDv3uBbiLKR0qX4Ek1va8nhC+6EySU5BQF8+yKQqSXgOjS8hqdzBnUyEvf8F5sGehhpco/QpvbyITn+r2oSmcQZDTxRSx6WGk= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB4513.eurprd04.prod.outlook.com (52.135.149.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.21; Wed, 4 Dec 2019 10:14:45 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::f16d:a26a:840:f97c]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::f16d:a26a:840:f97c%4]) with mapi id 15.20.2495.014; Wed, 4 Dec 2019 10:14:45 +0000 From: Peng Fan To: "sboyd@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , Abel Vesa , Aisheng Dong CC: "kernel@pengutronix.de" , dl-linux-imx , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Leonard Crestez , Alice Guo , Peng Fan Subject: [PATCH] clk: imx: imx8qxp-lpcg: use devm_platform_ioremap_resource Thread-Topic: [PATCH] clk: imx: imx8qxp-lpcg: use devm_platform_ioremap_resource Thread-Index: AQHVqoum7IH7ZRFDgESKl5wnHnxd3Q== Date: Wed, 4 Dec 2019 10:14:45 +0000 Message-ID: <1575454349-5762-1-git-send-email-peng.fan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK2PR02CA0145.apcprd02.prod.outlook.com (2603:1096:202:16::29) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 05331911-3731-4a97-dc40-08d778a2c8fa x-ms-traffictypediagnostic: AM0PR04MB4513:|AM0PR04MB4513: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1284; x-forefront-prvs: 0241D5F98C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(346002)(136003)(366004)(376002)(39860400002)(396003)(189003)(199004)(66946007)(54906003)(7736002)(305945005)(6486002)(50226002)(6506007)(6512007)(8676002)(99286004)(71190400001)(316002)(102836004)(26005)(64756008)(81166006)(8936002)(66556008)(81156014)(2616005)(186003)(86362001)(66476007)(14454004)(66446008)(25786009)(71200400001)(110136005)(4326008)(2201001)(6116002)(6436002)(2501003)(6636002)(2906002)(5660300002)(478600001)(36756003)(3846002)(52116002)(44832011)(32563001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4513;H:AM0PR04MB4481.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 52Ia2fKFInVG21yKa56vGM35EWLqauAd03C64dRjGUe2HfvRvj8VAayU9pxEAh//9kC2nHdQAM2Qd8e7y8aUr7jPtPfgvc0ottON0UeIZnEWyAttoOgN5GnYzpc+syYb5neV38683M+ryavicbYTCRqY8KeJx6T/YCx3LU4djiqT4JTA5p2WvCS/wllOui/bpITFWjjn+SUqzRnVBKWViIPs5IpU4pa1y0TnSPZ0KftTlSenOI+Z3+Am0h8MuVlaG3igdABAhdwaCsf4Fpwi72/d5XjwQ20Qc63pGX7l7Y96/SnuDdxFghAjk8Ev0AxgS68qsPnWg6D2CHH86/mrR54O3UqM6nSxlBF07//37k7Y/Y+wgMOFBBmOhwRpbchv5qp8BTnRjDeaaxo8dZdY0TDeH/ZNk5+epBpPPhQoBx/TTaVX3W0yf6fpTcxWrwtNSWHmRSk1jZb4OWMhs9BseWW84KJH4f0jVzDzomHU+2Xj9rtTx0B8C+OrKo4YmaAV Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05331911-3731-4a97-dc40-08d778a2c8fa X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Dec 2019 10:14:45.1721 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bOjnaCqWk3uHteP1LlSXiKpOcWiIokJ5ZDWu5+LglNjnaTfQMCm4p2pEupTBWEIiEOmweZy6Sb5KP2aN94goIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4513 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan devm_platform_ioremap_resource() wraps platform_get_resource() and devm_ioremap_resource(), we could use this API to simplify the code. Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8qxp-lpcg.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/clk/imx/clk-imx8qxp-lpcg.c b/drivers/clk/imx/clk-imx8q= xp-lpcg.c index c0aff7ca6374..3f2c2b068c73 100644 --- a/drivers/clk/imx/clk-imx8qxp-lpcg.c +++ b/drivers/clk/imx/clk-imx8qxp-lpcg.c @@ -164,7 +164,6 @@ static int imx8qxp_lpcg_clk_probe(struct platform_devic= e *pdev) struct clk_hw_onecell_data *clk_data; const struct imx8qxp_ss_lpcg *ss_lpcg; const struct imx8qxp_lpcg_data *lpcg; - struct resource *res; struct clk_hw **clks; void __iomem *base; int i; @@ -173,12 +172,9 @@ static int imx8qxp_lpcg_clk_probe(struct platform_devi= ce *pdev) if (!ss_lpcg) return -ENODEV; =20 - res =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -EINVAL; - base =3D devm_ioremap(dev, res->start, resource_size(res)); + base =3D devm_platform_ioremap_resource(pdev, 0); if (!base) - return -ENOMEM; + return PTR_ERR(base); =20 clk_data =3D devm_kzalloc(&pdev->dev, struct_size(clk_data, hws, ss_lpcg->num_max), GFP_KERNEL); --=20 2.16.4