lkml.org 
[lkml]   [2021]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4] gpio: tegra186: Add ACPI support
From
Date

On 01/07/2021 06:01, Akhil R wrote:
> Add ACPI module ID to probe the driver from the ACPI based bootloader
> firmware.
>
> Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> ---
> drivers/gpio/gpio-tegra186.c | 32 +++++++++++++++++++++++++-------
> 1 file changed, 25 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c
> index 1bd9e44..e0ba8cd 100644
> --- a/drivers/gpio/gpio-tegra186.c
> +++ b/drivers/gpio/gpio-tegra186.c
> @@ -620,15 +620,21 @@ static int tegra186_gpio_probe(struct platform_device *pdev)
> if (!gpio)
> return -ENOMEM;
>
> - gpio->soc = of_device_get_match_data(&pdev->dev);
> + gpio->soc = device_get_match_data(&pdev->dev);
>
> gpio->secure = devm_platform_ioremap_resource_byname(pdev, "security");
> - if (IS_ERR(gpio->secure))
> - return PTR_ERR(gpio->secure);
> -
> gpio->base = devm_platform_ioremap_resource_byname(pdev, "gpio");
> - if (IS_ERR(gpio->base))
> - return PTR_ERR(gpio->base);
> +
> + if (IS_ERR(gpio->secure) || IS_ERR(gpio->base)) {


The OR here seems a bit odd, my preference would be how Andy suggested
initially ...

gpio->secure = devm_platform_ioremap_resource_byname(pdev, "security");
if (IS_ERR(gpio->secure)) {
gpio->secure = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(gpio->secure))
return PTR_ERR(gpio->secure)
}

Cheers
Jon

--
nvpublic

\
 
 \ /
  Last update: 2021-07-01 07:55    [W:0.083 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site