.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Pinconf driver for TI DA850/OMAP-L138/AM18XX pullup/pulldown groups |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2016 David Lechner |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify it |
---|
7 | | - * under the terms of the GNU General Public License as published by the Free |
---|
8 | | - * Software Foundation; version 2 of the License. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
---|
11 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
12 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
13 | | - * more details. |
---|
14 | 6 | */ |
---|
15 | 7 | |
---|
16 | 8 | #include <linux/bitops.h> |
---|
.. | .. |
---|
154 | 146 | { |
---|
155 | 147 | struct device *dev = &pdev->dev; |
---|
156 | 148 | struct da850_pupd_data *data; |
---|
157 | | - struct resource *res; |
---|
158 | 149 | |
---|
159 | 150 | data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); |
---|
160 | 151 | if (!data) |
---|
161 | 152 | return -ENOMEM; |
---|
162 | 153 | |
---|
163 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
164 | | - data->base = devm_ioremap_resource(dev, res); |
---|
| 154 | + data->base = devm_platform_ioremap_resource(pdev, 0); |
---|
165 | 155 | if (IS_ERR(data->base)) { |
---|
166 | 156 | dev_err(dev, "Could not map resource\n"); |
---|
167 | 157 | return PTR_ERR(data->base); |
---|