hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/rtc/rtc-pxa.c
....@@ -1,22 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Real Time Clock interface for XScale PXA27x and PXA3xx
34 *
45 * Copyright (C) 2008 Robert Jarzmik
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
- *
206 */
217
228 #include <linux/init.h>
....@@ -145,8 +131,7 @@
145131
146132 static irqreturn_t pxa_rtc_irq(int irq, void *dev_id)
147133 {
148
- struct platform_device *pdev = to_platform_device(dev_id);
149
- struct pxa_rtc *pxa_rtc = platform_get_drvdata(pdev);
134
+ struct pxa_rtc *pxa_rtc = dev_get_drvdata(dev_id);
150135 u32 rtsr;
151136 unsigned long events = 0;
152137
....@@ -339,15 +324,11 @@
339324 }
340325
341326 sa1100_rtc->irq_1hz = platform_get_irq(pdev, 0);
342
- if (sa1100_rtc->irq_1hz < 0) {
343
- dev_err(dev, "No 1Hz IRQ resource defined\n");
327
+ if (sa1100_rtc->irq_1hz < 0)
344328 return -ENXIO;
345
- }
346329 sa1100_rtc->irq_alarm = platform_get_irq(pdev, 1);
347
- if (sa1100_rtc->irq_alarm < 0) {
348
- dev_err(dev, "No alarm IRQ resource defined\n");
330
+ if (sa1100_rtc->irq_alarm < 0)
349331 return -ENXIO;
350
- }
351332
352333 sa1100_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
353334 if (IS_ERR(sa1100_rtc->rtc))