| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/drivers/misc/xillybus_of.c |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2011 Xillybus Ltd, http://xillybus.com |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Driver for the Xillybus FPGA/host framework using Open Firmware. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the smems of the GNU General Public License as published by |
|---|
| 10 | | - * the Free Software Foundation; version 2 of the License. |
|---|
| 11 | 8 | */ |
|---|
| 12 | 9 | |
|---|
| 13 | 10 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 119 | 116 | struct xilly_endpoint *endpoint; |
|---|
| 120 | 117 | int rc; |
|---|
| 121 | 118 | int irq; |
|---|
| 122 | | - struct resource *res; |
|---|
| 123 | 119 | struct xilly_endpoint_hardware *ephw = &of_hw; |
|---|
| 124 | 120 | |
|---|
| 125 | 121 | if (of_property_read_bool(dev->of_node, "dma-coherent")) |
|---|
| .. | .. |
|---|
| 132 | 128 | |
|---|
| 133 | 129 | dev_set_drvdata(dev, endpoint); |
|---|
| 134 | 130 | |
|---|
| 135 | | - res = platform_get_resource(op, IORESOURCE_MEM, 0); |
|---|
| 136 | | - endpoint->registers = devm_ioremap_resource(dev, res); |
|---|
| 137 | | - |
|---|
| 131 | + endpoint->registers = devm_platform_ioremap_resource(op, 0); |
|---|
| 138 | 132 | if (IS_ERR(endpoint->registers)) |
|---|
| 139 | 133 | return PTR_ERR(endpoint->registers); |
|---|
| 140 | 134 | |
|---|