hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/drivers/rtc/rtc-r7301.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * EPSON TOYOCOM RTC-7301SF/DG Driver
34 *
....@@ -353,21 +354,16 @@
353354
354355 static int __init rtc7301_rtc_probe(struct platform_device *dev)
355356 {
356
- struct resource *res;
357357 void __iomem *regs;
358358 struct rtc7301_priv *priv;
359359 struct rtc_device *rtc;
360360 int ret;
361361
362
- res = platform_get_resource(dev, IORESOURCE_MEM, 0);
363
- if (!res)
364
- return -ENODEV;
365
-
366362 priv = devm_kzalloc(&dev->dev, sizeof(*priv), GFP_KERNEL);
367363 if (!priv)
368364 return -ENOMEM;
369365
370
- regs = devm_ioremap_resource(&dev->dev, res);
366
+ regs = devm_platform_ioremap_resource(dev, 0);
371367 if (IS_ERR(regs))
372368 return PTR_ERR(regs);
373369