hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/rtc/rtc-lpc24xx.c
....@@ -1,14 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * RTC driver for NXP LPC178x/18xx/43xx Real-Time Clock (RTC)
34 *
45 * Copyright (C) 2011 NXP Semiconductors
56 * 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
- *
127 */
138
149 #include <linux/clk.h>
....@@ -199,23 +194,19 @@
199194 static int lpc24xx_rtc_probe(struct platform_device *pdev)
200195 {
201196 struct lpc24xx_rtc *rtc;
202
- struct resource *res;
203197 int irq, ret;
204198
205199 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);
206200 if (!rtc)
207201 return -ENOMEM;
208202
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);
211204 if (IS_ERR(rtc->rtc_base))
212205 return PTR_ERR(rtc->rtc_base);
213206
214207 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)
217209 return irq;
218
- }
219210
220211 rtc->clk_rtc = devm_clk_get(&pdev->dev, "rtc");
221212 if (IS_ERR(rtc->clk_rtc)) {