forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/nvmem/imx-iim.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * i.MX IIM driver
34 *
....@@ -6,13 +7,6 @@
67 * Based on the barebox iim driver,
78 * Copyright (c) 2010 Baruch Siach <baruch@tkos.co.il>,
89 * 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
1610 */
1711
1812 #include <linux/device.h>
....@@ -104,7 +98,6 @@
10498 {
10599 const struct of_device_id *of_id;
106100 struct device *dev = &pdev->dev;
107
- struct resource *res;
108101 struct iim_priv *iim;
109102 struct nvmem_device *nvmem;
110103 struct nvmem_config cfg = {};
....@@ -114,8 +107,7 @@
114107 if (!iim)
115108 return -ENOMEM;
116109
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);
119111 if (IS_ERR(iim->base))
120112 return PTR_ERR(iim->base);
121113