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: <20121011151553.GC15428@gmail.com>
Date:	Thu, 11 Oct 2012 16:15:53 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Linus Walleij <linus.walleij@...ricsson.com>
Cc:	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Stephen Warren <swarren@...dia.com>,
	Anmar Oueja <anmar.oueja@...aro.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Rob Herring <rob.herring@...xeda.com>
Subject: Re: [PATCH] pinctrl/nomadik: always use the simple irqdomain

> From: Linus Walleij <linus.walleij@...aro.org>
> 
> Since the simple irqdomain will fall back to a linear domain
> if the first_irq provided is <= 0, just use this, just make
> sure the first_irq is negative in the device tree case.
> 
> Cc: Lee Jones <lee.jones@...aro.org>
> Cc: Rob Herring <rob.herring@...xeda.com>
> Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
> ---
>  drivers/pinctrl/pinctrl-nomadik.c | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
> index 992982c..a4a4247 100644
> --- a/drivers/pinctrl/pinctrl-nomadik.c
> +++ b/drivers/pinctrl/pinctrl-nomadik.c
> @@ -1277,6 +1277,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
>  	struct clk *clk;
>  	int secondary_irq;
>  	void __iomem *base;
> +	int irq_start = -1;
>  	int irq;
>  	int ret;
>  
> @@ -1380,19 +1381,11 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
>  
>  	platform_set_drvdata(dev, nmk_chip);
>  
> -	if (np) {
> -		/* The DT case will just grab a set of IRQ numbers */
> -		nmk_chip->domain = irq_domain_add_linear(np, NMK_GPIO_PER_CHIP,
> -				&nmk_gpio_irq_simple_ops, nmk_chip);
> -	} else {
> -		/* Non-DT legacy mode, use hardwired IRQ numbers */
> -		int irq_start;
> -
> +	if (!np)
>  		irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio);
> -		nmk_chip->domain = irq_domain_add_simple(NULL,
> +	nmk_chip->domain = irq_domain_add_simple(NULL,
>  				NMK_GPIO_PER_CHIP, irq_start,
>  				&nmk_gpio_irq_simple_ops, nmk_chip);
> -	}
>  	if (!nmk_chip->domain) {
>  		dev_err(&dev->dev, "failed to create irqdomain\n");
>  		ret = -ENOSYS;

Looks good:

Acked-by: Lee Jones <lee.jones@...aro.org>

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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