hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/rtc/rtc-mt7622.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for MediaTek SoC based RTC
34 *
45 * Copyright (C) 2017 Sean Wang <sean.wang@mediatek.com>
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License as
8
- * published by the Free Software Foundation; either version 2 of
9
- * the License, or (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.
156 */
167
178 #include <linux/clk.h>
....@@ -312,7 +303,6 @@
312303 static int mtk_rtc_probe(struct platform_device *pdev)
313304 {
314305 struct mtk_rtc *hw;
315
- struct resource *res;
316306 int ret;
317307
318308 hw = devm_kzalloc(&pdev->dev, sizeof(*hw), GFP_KERNEL);
....@@ -321,8 +311,7 @@
321311
322312 platform_set_drvdata(pdev, hw);
323313
324
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
325
- hw->base = devm_ioremap_resource(&pdev->dev, res);
314
+ hw->base = devm_platform_ioremap_resource(pdev, 0);
326315 if (IS_ERR(hw->base))
327316 return PTR_ERR(hw->base);
328317
....@@ -338,7 +327,6 @@
338327
339328 hw->irq = platform_get_irq(pdev, 0);
340329 if (hw->irq < 0) {
341
- dev_err(&pdev->dev, "No IRQ resource\n");
342330 ret = hw->irq;
343331 goto err;
344332 }