forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/tegra/tegra20_das.c
....@@ -1,23 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * tegra20_das.c - Tegra20 DAS driver
34 *
45 * Author: Stephen Warren <swarren@nvidia.com>
56 * 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
- *
217 */
228
239 #include <linux/device.h>
....@@ -112,8 +98,7 @@
11298
11399 static bool tegra20_das_wr_rd_reg(struct device *dev, unsigned int reg)
114100 {
115
- if ((reg >= TEGRA20_DAS_DAP_CTRL_SEL) &&
116
- (reg <= LAST_REG(DAP_CTRL_SEL)))
101
+ if (reg <= LAST_REG(DAP_CTRL_SEL))
117102 return true;
118103 if ((reg >= TEGRA20_DAS_DAC_INPUT_DATA_CLK_SEL) &&
119104 (reg <= LAST_REG(DAC_INPUT_DATA_CLK_SEL)))
....@@ -134,7 +119,6 @@
134119
135120 static int tegra20_das_probe(struct platform_device *pdev)
136121 {
137
- struct resource *res;
138122 void __iomem *regs;
139123 int ret = 0;
140124
....@@ -148,8 +132,7 @@
148132 }
149133 das->dev = &pdev->dev;
150134
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);
153136 if (IS_ERR(regs)) {
154137 ret = PTR_ERR(regs);
155138 goto err;