hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/rtc/rtc-ds1286.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * DS1286 Real Time Clock interface for Linux
34 *
....@@ -5,11 +6,6 @@
56 * Copyright (C) 2008 Thomas Bogendoerfer
67 *
78 * Based on code written by Paul Gortmaker.
8
- *
9
- * This program is free software; you can redistribute it and/or modify it
10
- * under the terms of the GNU General Public License as published by the
11
- * Free Software Foundation; either version 2 of the License, or (at your
12
- * option) any later version.
139 */
1410
1511 #include <linux/module.h>
....@@ -327,15 +323,13 @@
327323 static int ds1286_probe(struct platform_device *pdev)
328324 {
329325 struct rtc_device *rtc;
330
- struct resource *res;
331326 struct ds1286_priv *priv;
332327
333328 priv = devm_kzalloc(&pdev->dev, sizeof(struct ds1286_priv), GFP_KERNEL);
334329 if (!priv)
335330 return -ENOMEM;
336331
337
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
338
- priv->rtcregs = devm_ioremap_resource(&pdev->dev, res);
332
+ priv->rtcregs = devm_platform_ioremap_resource(pdev, 0);
339333 if (IS_ERR(priv->rtcregs))
340334 return PTR_ERR(priv->rtcregs);
341335