Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3044122ybp; Sun, 6 Oct 2019 03:35:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvklFpyHCbGC4yek5U1WZUWXh6YTKEqURzKNAjZAqU1aWeK2r+z6ZG/GbZMdQytpTWddKR X-Received: by 2002:a50:fa09:: with SMTP id b9mr24064568edq.165.1570358106128; Sun, 06 Oct 2019 03:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570358106; cv=none; d=google.com; s=arc-20160816; b=J+qNl8W2eSSdBO74MFnmvpx21KU49LiL2IOD+Oqd7Kab2maVRv6P/l839NEYh/9gfq bOvRJm5PBDY6DYUZGTEszKD68ZG9L32S9shilow6RzLkaD5pYCpuo3GELAfnbLpyEt5Z aY7GwMGmeo2HTAwTT2urTzgqQ70gJNJdZRsOIj4ZfsOhoQE8NqFfN+zxDizHebHddsw5 knKiq0im418e9SyTIR/uwcucReJBsS4h5fY9urW+tCNFhDpVLxYoH2vaf1PaAtdNILBH 90Aq1+Nv4wC0MCTDe8HUVspyXVYjVZVm0KXlgqJVsWME3vLAUoNOu4FMNQ5GpOw1+rKr 05iQ== 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=bfcp3mo8cka2Ksh/tJc0eaJd0+7D44HO4Vlhl2puLnc=; b=O5MZ91+hKamMWigfxAm6YsALqwpbINAD+OMak1+FZsadiNFbm7ww9kGC6BWtx+dWES jR/05X2VQXeuI2VMJ+Smf+bxVL+hHeGCCAFcZojqH3mfU+SUa3oAKV7U02liZlhf3++l uFWlV/aPsLV7GRBk1bIUAEvZAe27hAHj8IJ87EZLBQ5zwP1zEdYqSm6cepoCYtK2moLe IX6mHvflWYYi4eMR8km+Fc5nlb/qSs7BgNNSzxgRD6nTZQi1FxO5seY/XsYmmhw18EwG hGNPqyKuXj/0tkzqZt7tP7pEa7GgkjDAk/T+NxvLGP4kea2RbdvQRwf2TeuHtdS9bgFT uuhw== 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 o22si4184501ejd.437.2019.10.06.03.34.42; Sun, 06 Oct 2019 03:35:06 -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 S1726616AbfJFKcV (ORCPT + 99 others); Sun, 6 Oct 2019 06:32:21 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:56660 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726293AbfJFKcU (ORCPT ); Sun, 6 Oct 2019 06:32:20 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 821851ED13638A7FF2C3; Sun, 6 Oct 2019 18:32:17 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:32:09 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , YueHaibing Subject: [PATCH -next 03/34] rtc: brcmstb-waketimer: use devm_platform_ioremap_resource() to simplify code Date: Sun, 6 Oct 2019 18:29:22 +0800 Message-ID: <20191006102953.57536-4-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-brcmstb-waketimer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-brcmstb-waketimer.c b/drivers/rtc/rtc-brcmstb-waketimer.c index 3e9800f..cb7af87 100644 --- a/drivers/rtc/rtc-brcmstb-waketimer.c +++ b/drivers/rtc/rtc-brcmstb-waketimer.c @@ -200,7 +200,6 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct brcmstb_waketmr *timer; - struct resource *res; int ret; timer = devm_kzalloc(dev, sizeof(*timer), GFP_KERNEL); @@ -210,8 +209,7 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev) platform_set_drvdata(pdev, timer); timer->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - timer->base = devm_ioremap_resource(dev, res); + timer->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(timer->base)) return PTR_ERR(timer->base); -- 2.7.4