Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3044784ybp; Sun, 6 Oct 2019 03:35:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXfaCvdyZEiZ/9Xr51mtjfAXO6qlnfUZ+W3gqwJel5RI9kBawkuj/N77z5fkubW+fzwVDU X-Received: by 2002:a17:906:4c4c:: with SMTP id d12mr18698730ejw.174.1570358159608; Sun, 06 Oct 2019 03:35:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358159; cv=none; d=google.com; s=arc-20160816; b=OcC/vFeW7HQ7yMZdhxuplQUGvxgqfAd7EVVnkOm/O1ejeoYAC3eGL+dOruyFL5L5yv ah2ueFnDQikyQfSNQpWhN+Sj5WYWtA4ImeiuBA4Rbc3dIhq4zz8WlJFPqvEDLnWuwwgZ UX93qiW8/cTTwAbW+1TRnrNIbYo4MybZyyiAqQ1cPC8xwYgOj2V1Z1/tf7+J+DYw+RJY aQqkrACua+GKRPl8EpVgSBxCLUbfkz7dDIcTX96ykcL5Pbub82afESgn1pPBf0t3USqS RJmHaywiiRI6tPOaG7H2B1M9MgWW/N8cZdzq1AJJ/F+a04uwzEzA7Hi/gnpOopxzM9xB 2BXQ== 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=Dp8yMlIYea2YBQkVRzPCKebttefK+4qt6eJkNZ8amfY=; b=Br/tSNreEn+PO0Luo/BkjY9vtK2oQfPfp2Ejctxw8wfHZmi/EK7RhuZBoGkNlHwr61 8ncld7kL1cyj6lV7UV3UEfW6c+WaB7UiGiSTP3mzUfNzB6JF8XLz9ccvV+JGvTQw/2OQ dXB2hyLOQlCWyss80oOYINB8Vcv4DRVAqrJZSRqjCTCP1R8krvrjMdG2Lpuo68IDS5mN rMojT9mBL0evduQlARSN8DpEsS4H81mug8wndP4dS4pWn262zXKOt/04wB9Hj56CbuiR ILyVTZvia/7wfNaBdgnfYTaL/I3pVPdcL1OHbCE0jn8WMmlAxCgFpsQXsCCWCcc4H7xB my2Q== 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 t26si5091155eju.238.2019.10.06.03.35.35; Sun, 06 Oct 2019 03:35:59 -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 S1727242AbfJFKeH (ORCPT + 99 others); Sun, 6 Oct 2019 06:34:07 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:58794 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726317AbfJFKeF (ORCPT ); Sun, 6 Oct 2019 06:34:05 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 171069924967F1A17DCC; Sun, 6 Oct 2019 18:34:03 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:33:52 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 31/34] rtc: tx4939: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:50 +0800 Message-ID: <20191006102953.57536-32-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20191006102953.57536-1-yuehaibing@huawei.com> References: <20191006102953.57536-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/rtc/rtc-tx4939.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c index 5a29915..715b829 100644 --- a/drivers/rtc/rtc-tx4939.c +++ b/drivers/rtc/rtc-tx4939.c @@ -236,7 +236,6 @@ static int __init tx4939_rtc_probe(struct platform_device *pdev) { struct rtc_device *rtc; struct tx4939rtc_plat_data *pdata; - struct resource *res; int irq, ret; struct nvmem_config nvmem_cfg = { .name = "tx4939_nvram", @@ -253,8 +252,7 @@ static int __init tx4939_rtc_probe(struct platform_device *pdev) return -ENOMEM; platform_set_drvdata(pdev, pdata); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pdata->rtcreg = devm_ioremap_resource(&pdev->dev, res); + pdata->rtcreg = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pdata->rtcreg)) return PTR_ERR(pdata->rtcreg); -- 2.7.4