hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/spi/spi-lp8841-rtc.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * SPI master driver for ICP DAS LP-8841 RTC
34 *
....@@ -8,16 +9,6 @@
89 * Dallas DS1302 RTC Support
910 * Copyright (C) 2002 David McCullough
1011 * Copyright (C) 2003 - 2007 Paul Mundt
11
- *
12
- * This program is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License as published by
14
- * the Free Software Foundation; either version 2 of the License, or
15
- * (at your option) any later version.
16
- *
17
- * This program is distributed in the hope that it will be useful,
18
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- * GNU General Public License for more details.
2112 */
2213 #include <linux/delay.h>
2314 #include <linux/kernel.h>
....@@ -194,7 +185,6 @@
194185 int ret;
195186 struct spi_master *master;
196187 struct spi_lp8841_rtc *data;
197
- void *iomem;
198188
199189 master = spi_alloc_master(&pdev->dev, sizeof(*data));
200190 if (!master)
....@@ -216,8 +206,7 @@
216206
217207 data = spi_master_get_devdata(master);
218208
219
- iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
220
- data->iomem = devm_ioremap_resource(&pdev->dev, iomem);
209
+ data->iomem = devm_platform_ioremap_resource(pdev, 0);
221210 ret = PTR_ERR_OR_ZERO(data->iomem);
222211 if (ret) {
223212 dev_err(&pdev->dev, "failed to get IO address\n");