.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * IIO ADC driver for NXP LPC18xx ADC |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
9 | 6 | * |
---|
10 | 7 | * UNSUPPORTED hardware features: |
---|
11 | 8 | * - Hardware triggers |
---|
.. | .. |
---|
122 | 119 | { |
---|
123 | 120 | struct iio_dev *indio_dev; |
---|
124 | 121 | struct lpc18xx_adc *adc; |
---|
125 | | - struct resource *res; |
---|
126 | 122 | unsigned int clkdiv; |
---|
127 | 123 | unsigned long rate; |
---|
128 | 124 | int ret; |
---|
.. | .. |
---|
136 | 132 | adc->dev = &pdev->dev; |
---|
137 | 133 | mutex_init(&adc->lock); |
---|
138 | 134 | |
---|
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); |
---|
141 | 136 | if (IS_ERR(adc->base)) |
---|
142 | 137 | return PTR_ERR(adc->base); |
---|
143 | 138 | |
---|
.. | .. |
---|
157 | 152 | } |
---|
158 | 153 | |
---|
159 | 154 | indio_dev->name = dev_name(&pdev->dev); |
---|
160 | | - indio_dev->dev.parent = &pdev->dev; |
---|
161 | 155 | indio_dev->info = &lpc18xx_adc_info; |
---|
162 | 156 | indio_dev->modes = INDIO_DIRECT_MODE; |
---|
163 | 157 | indio_dev->channels = lpc18xx_adc_iio_channels; |
---|