.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * RTC driver for NXP LPC178x/18xx/43xx Real-Time Clock (RTC) |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2011 NXP Semiconductors |
---|
5 | 6 | * Copyright (C) 2015 Joachim Eastwood <manabian@gmail.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License as published by |
---|
9 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
10 | | - * (at your option) any later version. |
---|
11 | | - * |
---|
12 | 7 | */ |
---|
13 | 8 | |
---|
14 | 9 | #include <linux/clk.h> |
---|
.. | .. |
---|
199 | 194 | static int lpc24xx_rtc_probe(struct platform_device *pdev) |
---|
200 | 195 | { |
---|
201 | 196 | struct lpc24xx_rtc *rtc; |
---|
202 | | - struct resource *res; |
---|
203 | 197 | int irq, ret; |
---|
204 | 198 | |
---|
205 | 199 | rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); |
---|
206 | 200 | if (!rtc) |
---|
207 | 201 | return -ENOMEM; |
---|
208 | 202 | |
---|
209 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
210 | | - rtc->rtc_base = devm_ioremap_resource(&pdev->dev, res); |
---|
| 203 | + rtc->rtc_base = devm_platform_ioremap_resource(pdev, 0); |
---|
211 | 204 | if (IS_ERR(rtc->rtc_base)) |
---|
212 | 205 | return PTR_ERR(rtc->rtc_base); |
---|
213 | 206 | |
---|
214 | 207 | irq = platform_get_irq(pdev, 0); |
---|
215 | | - if (irq < 0) { |
---|
216 | | - dev_warn(&pdev->dev, "can't get interrupt resource\n"); |
---|
| 208 | + if (irq < 0) |
---|
217 | 209 | return irq; |
---|
218 | | - } |
---|
219 | 210 | |
---|
220 | 211 | rtc->clk_rtc = devm_clk_get(&pdev->dev, "rtc"); |
---|
221 | 212 | if (IS_ERR(rtc->clk_rtc)) { |
---|