| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Aspeed AST2400/2500 ADC |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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 | | - * |
|---|
| 10 | 6 | */ |
|---|
| 11 | 7 | |
|---|
| 12 | 8 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 177 | 173 | struct iio_dev *indio_dev; |
|---|
| 178 | 174 | struct aspeed_adc_data *data; |
|---|
| 179 | 175 | const struct aspeed_adc_model_data *model_data; |
|---|
| 180 | | - struct resource *res; |
|---|
| 181 | 176 | const char *clk_parent_name; |
|---|
| 182 | 177 | int ret; |
|---|
| 183 | 178 | u32 adc_engine_control_reg_val; |
|---|
| .. | .. |
|---|
| 190 | 185 | data->dev = &pdev->dev; |
|---|
| 191 | 186 | platform_set_drvdata(pdev, indio_dev); |
|---|
| 192 | 187 | |
|---|
| 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); |
|---|
| 195 | 189 | if (IS_ERR(data->base)) |
|---|
| 196 | 190 | return PTR_ERR(data->base); |
|---|
| 197 | 191 | |
|---|
| .. | .. |
|---|
| 259 | 253 | |
|---|
| 260 | 254 | model_data = of_device_get_match_data(&pdev->dev); |
|---|
| 261 | 255 | indio_dev->name = model_data->model_name; |
|---|
| 262 | | - indio_dev->dev.parent = &pdev->dev; |
|---|
| 263 | 256 | indio_dev->info = &aspeed_adc_iio_info; |
|---|
| 264 | 257 | indio_dev->modes = INDIO_DIRECT_MODE; |
|---|
| 265 | 258 | indio_dev->channels = aspeed_adc_iio_channels; |
|---|