lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2a8eb285-3b71-199c-1bf4-39fb47fac77e@nvidia.com>
Date:   Thu, 1 Jul 2021 06:53:38 +0100
From:   Jon Hunter <jonathanh@...dia.com>
To:     Akhil R <akhilrajeev@...dia.com>, <andy.shevchenko@...il.com>
CC:     <bgolaszewski@...libre.com>, <kyarlagadda@...dia.com>,
        <ldewangan@...dia.com>, <linus.walleij@...aro.org>,
        <linux-gpio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-tegra@...r.kernel.org>, <mperttunen@...dia.com>,
        <smangipudi@...dia.com>, <thierry.reding@...il.com>
Subject: Re: [PATCH v4] gpio: tegra186: Add ACPI support


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@...dia.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ