| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * SPI master driver for ICP DAS LP-8841 RTC |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 8 | 9 | * Dallas DS1302 RTC Support |
|---|
| 9 | 10 | * Copyright (C) 2002 David McCullough |
|---|
| 10 | 11 | * 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. |
|---|
| 21 | 12 | */ |
|---|
| 22 | 13 | #include <linux/delay.h> |
|---|
| 23 | 14 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 194 | 185 | int ret; |
|---|
| 195 | 186 | struct spi_master *master; |
|---|
| 196 | 187 | struct spi_lp8841_rtc *data; |
|---|
| 197 | | - void *iomem; |
|---|
| 198 | 188 | |
|---|
| 199 | 189 | master = spi_alloc_master(&pdev->dev, sizeof(*data)); |
|---|
| 200 | 190 | if (!master) |
|---|
| .. | .. |
|---|
| 216 | 206 | |
|---|
| 217 | 207 | data = spi_master_get_devdata(master); |
|---|
| 218 | 208 | |
|---|
| 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); |
|---|
| 221 | 210 | ret = PTR_ERR_OR_ZERO(data->iomem); |
|---|
| 222 | 211 | if (ret) { |
|---|
| 223 | 212 | dev_err(&pdev->dev, "failed to get IO address\n"); |
|---|