hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/spi/spi-meson-spifc.c
....@@ -1,15 +1,9 @@
1
-/*
2
- * Driver for Amlogic Meson SPI flash controller (SPIFC)
3
- *
4
- * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com>
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * version 2 as published by the Free Software Foundation.
9
- *
10
- * You should have received a copy of the GNU General Public License
11
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
12
- */
1
+// SPDX-License-Identifier: GPL-2.0+
2
+//
3
+// Driver for Amlogic Meson SPI flash controller (SPIFC)
4
+//
5
+// Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com>
6
+//
137
148 #include <linux/clk.h>
159 #include <linux/delay.h>
....@@ -76,7 +70,7 @@
7670 * @master: the SPI master
7771 * @regmap: regmap for device registers
7872 * @clk: input clock of the built-in baud rate generator
79
- * @device: the device structure
73
+ * @dev: the device structure
8074 */
8175 struct meson_spifc {
8276 struct spi_master *master;
....@@ -292,7 +286,6 @@
292286 {
293287 struct spi_master *master;
294288 struct meson_spifc *spifc;
295
- struct resource *res;
296289 void __iomem *base;
297290 unsigned int rate;
298291 int ret = 0;
....@@ -306,8 +299,7 @@
306299 spifc = spi_master_get_devdata(master);
307300 spifc->dev = &pdev->dev;
308301
309
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
310
- base = devm_ioremap_resource(spifc->dev, res);
302
+ base = devm_platform_ioremap_resource(pdev, 0);
311303 if (IS_ERR(base)) {
312304 ret = PTR_ERR(base);
313305 goto out_err;