.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * tegra20_das.c - Tegra20 DAS driver |
---|
3 | 4 | * |
---|
4 | 5 | * Author: Stephen Warren <swarren@nvidia.com> |
---|
5 | 6 | * Copyright (C) 2010 - NVIDIA, Inc. |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or |
---|
8 | | - * modify it under the terms of the GNU General Public License |
---|
9 | | - * version 2 as published by the Free Software Foundation. |
---|
10 | | - * |
---|
11 | | - * This program is distributed in the hope that it will be useful, but |
---|
12 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
14 | | - * General Public License for more details. |
---|
15 | | - * |
---|
16 | | - * You should have received a copy of the GNU General Public License |
---|
17 | | - * along with this program; if not, write to the Free Software |
---|
18 | | - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
---|
19 | | - * 02110-1301 USA |
---|
20 | | - * |
---|
21 | 7 | */ |
---|
22 | 8 | |
---|
23 | 9 | #include <linux/device.h> |
---|
.. | .. |
---|
112 | 98 | |
---|
113 | 99 | static bool tegra20_das_wr_rd_reg(struct device *dev, unsigned int reg) |
---|
114 | 100 | { |
---|
115 | | - if ((reg >= TEGRA20_DAS_DAP_CTRL_SEL) && |
---|
116 | | - (reg <= LAST_REG(DAP_CTRL_SEL))) |
---|
| 101 | + if (reg <= LAST_REG(DAP_CTRL_SEL)) |
---|
117 | 102 | return true; |
---|
118 | 103 | if ((reg >= TEGRA20_DAS_DAC_INPUT_DATA_CLK_SEL) && |
---|
119 | 104 | (reg <= LAST_REG(DAC_INPUT_DATA_CLK_SEL))) |
---|
.. | .. |
---|
134 | 119 | |
---|
135 | 120 | static int tegra20_das_probe(struct platform_device *pdev) |
---|
136 | 121 | { |
---|
137 | | - struct resource *res; |
---|
138 | 122 | void __iomem *regs; |
---|
139 | 123 | int ret = 0; |
---|
140 | 124 | |
---|
.. | .. |
---|
148 | 132 | } |
---|
149 | 133 | das->dev = &pdev->dev; |
---|
150 | 134 | |
---|
151 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
152 | | - regs = devm_ioremap_resource(&pdev->dev, res); |
---|
| 135 | + regs = devm_platform_ioremap_resource(pdev, 0); |
---|
153 | 136 | if (IS_ERR(regs)) { |
---|
154 | 137 | ret = PTR_ERR(regs); |
---|
155 | 138 | goto err; |
---|