hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/spi/spi-xlp.c
....@@ -1,15 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2003-2015 Broadcom Corporation
34 * All Rights Reserved
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 (GPL v2)
7
- * as published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
135 */
146 #include <linux/acpi.h>
157 #include <linux/clk.h>
....@@ -378,7 +370,6 @@
378370 {
379371 struct spi_master *master;
380372 struct xlp_spi_priv *xspi;
381
- struct resource *res;
382373 struct clk *clk;
383374 int irq, err;
384375
....@@ -386,16 +377,13 @@
386377 if (!xspi)
387378 return -ENOMEM;
388379
389
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
390
- xspi->base = devm_ioremap_resource(&pdev->dev, res);
380
+ xspi->base = devm_platform_ioremap_resource(pdev, 0);
391381 if (IS_ERR(xspi->base))
392382 return PTR_ERR(xspi->base);
393383
394384 irq = platform_get_irq(pdev, 0);
395
- if (irq < 0) {
396
- dev_err(&pdev->dev, "no IRQ resource found: %d\n", irq);
385
+ if (irq < 0)
397386 return irq;
398
- }
399387 err = devm_request_irq(&pdev->dev, irq, xlp_spi_interrupt, 0,
400388 pdev->name, xspi);
401389 if (err) {