| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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 | | - * |
|---|
| 8 | 4 | */ |
|---|
| 9 | 5 | |
|---|
| 10 | 6 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 314 | 310 | struct device_node *node = pdev->dev.of_node; |
|---|
| 315 | 311 | struct cc10001_adc_device *adc_dev; |
|---|
| 316 | 312 | unsigned long adc_clk_rate; |
|---|
| 317 | | - struct resource *res; |
|---|
| 318 | 313 | struct iio_dev *indio_dev; |
|---|
| 319 | 314 | unsigned long channel_map; |
|---|
| 320 | 315 | int ret; |
|---|
| .. | .. |
|---|
| 339 | 334 | if (ret) |
|---|
| 340 | 335 | return ret; |
|---|
| 341 | 336 | |
|---|
| 342 | | - indio_dev->dev.parent = &pdev->dev; |
|---|
| 343 | 337 | indio_dev->name = dev_name(&pdev->dev); |
|---|
| 344 | 338 | indio_dev->info = &cc10001_adc_info; |
|---|
| 345 | 339 | indio_dev->modes = INDIO_DIRECT_MODE; |
|---|
| 346 | 340 | |
|---|
| 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); |
|---|
| 349 | 342 | if (IS_ERR(adc_dev->reg_base)) { |
|---|
| 350 | 343 | ret = PTR_ERR(adc_dev->reg_base); |
|---|
| 351 | 344 | goto err_disable_reg; |
|---|