diff options
Diffstat (limited to 'drivers/rtc/rtc-sunxi.c')
-rw-r--r-- | drivers/rtc/rtc-sunxi.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/drivers/rtc/rtc-sunxi.c b/drivers/rtc/rtc-sunxi.c index 21865d3d8fe8..9b6f2483c1c6 100644 --- a/drivers/rtc/rtc-sunxi.c +++ b/drivers/rtc/rtc-sunxi.c @@ -1,21 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * An RTC driver for Allwinner A10/A20 * * Copyright (c) 2013, Carlo Caione <carlo.caione@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <linux/delay.h> @@ -455,10 +442,8 @@ static int sunxi_rtc_probe(struct platform_device *pdev) return PTR_ERR(chip->base); chip->irq = platform_get_irq(pdev, 0); - if (chip->irq < 0) { - dev_err(&pdev->dev, "No IRQ resource\n"); + if (chip->irq < 0) return chip->irq; - } ret = devm_request_irq(&pdev->dev, chip->irq, sunxi_rtc_alarmirq, 0, dev_name(&pdev->dev), chip); if (ret) { @@ -487,15 +472,7 @@ static int sunxi_rtc_probe(struct platform_device *pdev) chip->rtc->ops = &sunxi_rtc_ops; - ret = rtc_register_device(chip->rtc); - if (ret) { - dev_err(&pdev->dev, "unable to register device\n"); - return ret; - } - - dev_info(&pdev->dev, "RTC enabled\n"); - - return 0; + return rtc_register_device(chip->rtc); } static struct platform_driver sunxi_rtc_driver = { |