| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2003-2015 Broadcom Corporation |
|---|
| 3 | 4 | * 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. |
|---|
| 13 | 5 | */ |
|---|
| 14 | 6 | #include <linux/acpi.h> |
|---|
| 15 | 7 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 378 | 370 | { |
|---|
| 379 | 371 | struct spi_master *master; |
|---|
| 380 | 372 | struct xlp_spi_priv *xspi; |
|---|
| 381 | | - struct resource *res; |
|---|
| 382 | 373 | struct clk *clk; |
|---|
| 383 | 374 | int irq, err; |
|---|
| 384 | 375 | |
|---|
| .. | .. |
|---|
| 386 | 377 | if (!xspi) |
|---|
| 387 | 378 | return -ENOMEM; |
|---|
| 388 | 379 | |
|---|
| 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); |
|---|
| 391 | 381 | if (IS_ERR(xspi->base)) |
|---|
| 392 | 382 | return PTR_ERR(xspi->base); |
|---|
| 393 | 383 | |
|---|
| 394 | 384 | 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) |
|---|
| 397 | 386 | return irq; |
|---|
| 398 | | - } |
|---|
| 399 | 387 | err = devm_request_irq(&pdev->dev, irq, xlp_spi_interrupt, 0, |
|---|
| 400 | 388 | pdev->name, xspi); |
|---|
| 401 | 389 | if (err) { |
|---|