| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * i.MX IIM driver |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 6 | 7 | * Based on the barebox iim driver, |
|---|
| 7 | 8 | * Copyright (c) 2010 Baruch Siach <baruch@tkos.co.il>, |
|---|
| 8 | 9 | * Orex Computed Radiography |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 11 | | - * it under the terms of the GNU General Public License version 2 |
|---|
| 12 | | - * as published by the Free Software Foundation. |
|---|
| 13 | | - * |
|---|
| 14 | | - * http://www.opensource.org/licenses/gpl-license.html |
|---|
| 15 | | - * http://www.gnu.org/copyleft/gpl.html |
|---|
| 16 | 10 | */ |
|---|
| 17 | 11 | |
|---|
| 18 | 12 | #include <linux/device.h> |
|---|
| .. | .. |
|---|
| 104 | 98 | { |
|---|
| 105 | 99 | const struct of_device_id *of_id; |
|---|
| 106 | 100 | struct device *dev = &pdev->dev; |
|---|
| 107 | | - struct resource *res; |
|---|
| 108 | 101 | struct iim_priv *iim; |
|---|
| 109 | 102 | struct nvmem_device *nvmem; |
|---|
| 110 | 103 | struct nvmem_config cfg = {}; |
|---|
| .. | .. |
|---|
| 114 | 107 | if (!iim) |
|---|
| 115 | 108 | return -ENOMEM; |
|---|
| 116 | 109 | |
|---|
| 117 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 118 | | - iim->base = devm_ioremap_resource(dev, res); |
|---|
| 110 | + iim->base = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 119 | 111 | if (IS_ERR(iim->base)) |
|---|
| 120 | 112 | return PTR_ERR(iim->base); |
|---|
| 121 | 113 | |
|---|