hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/rtc/rtc-ac100.c
....@@ -1,18 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * RTC Driver for X-Powers AC100
34 *
45 * Copyright (c) 2016 Chen-Yu Tsai
56 *
67 * Chen-Yu Tsai <wens@csie.org>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
11
- *
12
- * This program is distributed in the hope that it will be useful, but WITHOUT
13
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15
- * more details.
168 */
179
1810 #include <linux/bcd.h>
....@@ -586,10 +578,8 @@
586578 chip->regmap = ac100->regmap;
587579
588580 chip->irq = platform_get_irq(pdev, 0);
589
- if (chip->irq < 0) {
590
- dev_err(&pdev->dev, "No IRQ resource\n");
581
+ if (chip->irq < 0)
591582 return chip->irq;
592
- }
593583
594584 chip->rtc = devm_rtc_allocate_device(&pdev->dev);
595585 if (IS_ERR(chip->rtc))
....@@ -620,15 +610,7 @@
620610 if (ret)
621611 return ret;
622612
623
- ret = rtc_register_device(chip->rtc);
624
- if (ret) {
625
- dev_err(&pdev->dev, "unable to register device\n");
626
- return ret;
627
- }
628
-
629
- dev_info(&pdev->dev, "RTC enabled\n");
630
-
631
- return 0;
613
+ return rtc_register_device(chip->rtc);
632614 }
633615
634616 static int ac100_rtc_remove(struct platform_device *pdev)