hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/iio/adc/lpc18xx_adc.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * IIO ADC driver for NXP LPC18xx ADC
34 *
45 * Copyright (C) 2016 Joachim Eastwood <manabian@gmail.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 *
107 * UNSUPPORTED hardware features:
118 * - Hardware triggers
....@@ -122,7 +119,6 @@
122119 {
123120 struct iio_dev *indio_dev;
124121 struct lpc18xx_adc *adc;
125
- struct resource *res;
126122 unsigned int clkdiv;
127123 unsigned long rate;
128124 int ret;
....@@ -136,8 +132,7 @@
136132 adc->dev = &pdev->dev;
137133 mutex_init(&adc->lock);
138134
139
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
140
- adc->base = devm_ioremap_resource(&pdev->dev, res);
135
+ adc->base = devm_platform_ioremap_resource(pdev, 0);
141136 if (IS_ERR(adc->base))
142137 return PTR_ERR(adc->base);
143138
....@@ -157,7 +152,6 @@
157152 }
158153
159154 indio_dev->name = dev_name(&pdev->dev);
160
- indio_dev->dev.parent = &pdev->dev;
161155 indio_dev->info = &lpc18xx_adc_info;
162156 indio_dev->modes = INDIO_DIRECT_MODE;
163157 indio_dev->channels = lpc18xx_adc_iio_channels;