| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Timberdale FPGA GPIO driver |
|---|
| 3 | 4 | * Author: Mocean Laboratories |
|---|
| 4 | 5 | * Copyright (c) 2009 Intel Corporation |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | | - * GNU General Public License for more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License |
|---|
| 16 | | - * along with this program; if not, write to the Free Software |
|---|
| 17 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 18 | 6 | */ |
|---|
| 19 | 7 | |
|---|
| 20 | 8 | /* Supports: |
|---|
| .. | .. |
|---|
| 229 | 217 | struct device *dev = &pdev->dev; |
|---|
| 230 | 218 | struct gpio_chip *gc; |
|---|
| 231 | 219 | struct timbgpio *tgpio; |
|---|
| 232 | | - struct resource *iomem; |
|---|
| 233 | 220 | struct timbgpio_platform_data *pdata = dev_get_platdata(&pdev->dev); |
|---|
| 234 | 221 | int irq = platform_get_irq(pdev, 0); |
|---|
| 235 | 222 | |
|---|
| .. | .. |
|---|
| 246 | 233 | |
|---|
| 247 | 234 | spin_lock_init(&tgpio->lock); |
|---|
| 248 | 235 | |
|---|
| 249 | | - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 250 | | - tgpio->membase = devm_ioremap_resource(dev, iomem); |
|---|
| 236 | + tgpio->membase = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 251 | 237 | if (IS_ERR(tgpio->membase)) |
|---|
| 252 | 238 | return PTR_ERR(tgpio->membase); |
|---|
| 253 | 239 | |
|---|