| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* ADC driver for sunxi platforms' (A10, A13 and A31) GPADC |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * Copyright (c) 2016 Quentin Schulz <quentin.schulz@free-electrons.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify it under |
|---|
| 6 | | - * the terms of the GNU General Public License version 2 as published by the |
|---|
| 7 | | - * Free Software Foundation. |
|---|
| 8 | 5 | * |
|---|
| 9 | 6 | * The Allwinner SoCs all have an ADC that can also act as a touchscreen |
|---|
| 10 | 7 | * controller and a thermal sensor. |
|---|
| .. | .. |
|---|
| 463 | 460 | atomic_set(atomic, 1); |
|---|
| 464 | 461 | |
|---|
| 465 | 462 | ret = platform_get_irq_byname(pdev, name); |
|---|
| 466 | | - if (ret < 0) { |
|---|
| 467 | | - dev_err(&pdev->dev, "no %s interrupt registered\n", name); |
|---|
| 463 | + if (ret < 0) |
|---|
| 468 | 464 | return ret; |
|---|
| 469 | | - } |
|---|
| 470 | 465 | |
|---|
| 471 | 466 | ret = regmap_irq_get_virq(mfd_dev->regmap_irqc, ret); |
|---|
| 472 | 467 | if (ret < 0) { |
|---|
| .. | .. |
|---|
| 501 | 496 | struct iio_dev *indio_dev) |
|---|
| 502 | 497 | { |
|---|
| 503 | 498 | struct sun4i_gpadc_iio *info = iio_priv(indio_dev); |
|---|
| 504 | | - struct resource *mem; |
|---|
| 505 | 499 | void __iomem *base; |
|---|
| 506 | 500 | int ret; |
|---|
| 507 | 501 | |
|---|
| .. | .. |
|---|
| 513 | 507 | indio_dev->num_channels = ARRAY_SIZE(sun8i_a33_gpadc_channels); |
|---|
| 514 | 508 | indio_dev->channels = sun8i_a33_gpadc_channels; |
|---|
| 515 | 509 | |
|---|
| 516 | | - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 517 | | - base = devm_ioremap_resource(&pdev->dev, mem); |
|---|
| 510 | + base = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 518 | 511 | if (IS_ERR(base)) |
|---|
| 519 | 512 | return PTR_ERR(base); |
|---|
| 520 | 513 | |
|---|
| .. | .. |
|---|
| 626 | 619 | info->indio_dev = indio_dev; |
|---|
| 627 | 620 | init_completion(&info->completion); |
|---|
| 628 | 621 | indio_dev->name = dev_name(&pdev->dev); |
|---|
| 629 | | - indio_dev->dev.parent = &pdev->dev; |
|---|
| 630 | | - indio_dev->dev.of_node = pdev->dev.of_node; |
|---|
| 631 | 622 | indio_dev->info = &sun4i_gpadc_iio_info; |
|---|
| 632 | 623 | indio_dev->modes = INDIO_DIRECT_MODE; |
|---|
| 633 | 624 | |
|---|