hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/iio/adc/aspeed_adc.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Aspeed AST2400/2500 ADC
34 *
45 * Copyright (C) 2017 Google, Inc.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
9
- *
106 */
117
128 #include <linux/clk.h>
....@@ -177,7 +173,6 @@
177173 struct iio_dev *indio_dev;
178174 struct aspeed_adc_data *data;
179175 const struct aspeed_adc_model_data *model_data;
180
- struct resource *res;
181176 const char *clk_parent_name;
182177 int ret;
183178 u32 adc_engine_control_reg_val;
....@@ -190,8 +185,7 @@
190185 data->dev = &pdev->dev;
191186 platform_set_drvdata(pdev, indio_dev);
192187
193
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
194
- data->base = devm_ioremap_resource(&pdev->dev, res);
188
+ data->base = devm_platform_ioremap_resource(pdev, 0);
195189 if (IS_ERR(data->base))
196190 return PTR_ERR(data->base);
197191
....@@ -259,7 +253,6 @@
259253
260254 model_data = of_device_get_match_data(&pdev->dev);
261255 indio_dev->name = model_data->model_name;
262
- indio_dev->dev.parent = &pdev->dev;
263256 indio_dev->info = &aspeed_adc_iio_info;
264257 indio_dev->modes = INDIO_DIRECT_MODE;
265258 indio_dev->channels = aspeed_adc_iio_channels;