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] [day] [month] [year] [list]
Message-Id: <4292851.WR4mddmlu0@ax5200p>
Date:	Tue, 29 Jul 2014 22:24:03 +0200
From:	Marc Dietrich <Marc.Dietrich@...physik.uni-giessen.de>
To:	Thierry Reding <thierry.reding@...il.com>
Cc:	Julian Andres Klode <jak@...-linux.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	ac100@...ts.launchpad.net, linux-tegra@...r.kernel.org,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] staging/nvec: Use platform_get_irq()

Am Dienstag 29 Juli 2014, 13:16:15 schrieb Thierry Reding:
> From: Thierry Reding <treding@...dia.com>
> 
> As opposed to platform_get_resource(), the platform_get_irq() function
> has special code to handle driver probe deferral when booting using DT
> and where an interrupt provider hasn't been registered yet. While this
> is unlikely to become an issue for nvec, platform_get_irq() is the
> recommended way to get at interrupts.
> 
> Signed-off-by: Thierry Reding <treding@...dia.com>

Thanks again, Thierry!

Acked-by: Marc Dietrich <marvin24@....de>



> ---
>  drivers/staging/nvec/nvec.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
> index 815065837ce7..a93208adbfcf 100644
> --- a/drivers/staging/nvec/nvec.c
> +++ b/drivers/staging/nvec/nvec.c
> @@ -821,8 +821,8 @@ static int tegra_nvec_probe(struct platform_device
> *pdev) if (IS_ERR(base))
>  		return PTR_ERR(base);
> 
> -	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> -	if (!res) {
> +	nvec->irq = platform_get_irq(pdev, 0);
> +	if (nvec->irq < 0) {
>  		dev_err(&pdev->dev, "no irq resource?\n");
>  		return -ENODEV;
>  	}
> @@ -840,7 +840,6 @@ static int tegra_nvec_probe(struct platform_device
> *pdev) }
> 
>  	nvec->base = base;
> -	nvec->irq = res->start;
>  	nvec->i2c_clk = i2c_clk;
>  	nvec->rx = &nvec->msg_pool[0];

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ