forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/iio/adc/cc10001_adc.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2014-2015 Imagination Technologies Ltd.
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms of the GNU General Public License version 2 as published by
6
- * the Free Software Foundation.
7
- *
84 */
95
106 #include <linux/clk.h>
....@@ -314,7 +310,6 @@
314310 struct device_node *node = pdev->dev.of_node;
315311 struct cc10001_adc_device *adc_dev;
316312 unsigned long adc_clk_rate;
317
- struct resource *res;
318313 struct iio_dev *indio_dev;
319314 unsigned long channel_map;
320315 int ret;
....@@ -339,13 +334,11 @@
339334 if (ret)
340335 return ret;
341336
342
- indio_dev->dev.parent = &pdev->dev;
343337 indio_dev->name = dev_name(&pdev->dev);
344338 indio_dev->info = &cc10001_adc_info;
345339 indio_dev->modes = INDIO_DIRECT_MODE;
346340
347
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
348
- adc_dev->reg_base = devm_ioremap_resource(&pdev->dev, res);
341
+ adc_dev->reg_base = devm_platform_ioremap_resource(pdev, 0);
349342 if (IS_ERR(adc_dev->reg_base)) {
350343 ret = PTR_ERR(adc_dev->reg_base);
351344 goto err_disable_reg;