lkml.org 
[lkml]   [2012]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mfd: db8500-prcmu: fix irqdomain usage
On Wed, 19 Dec 2012, Linus Walleij wrote:

> From: Linus Walleij <linus.walleij@linaro.org>
>
> This fixes two issues with the DB8500 PRCMU irqdomain:
> - You have to state the irq base 0 to get a linear domain
> for the DT case from irq_domain_add_simple()
> - The irqdomain was not used to translate the initial irq
> request using irq_create_mapping() making the linear
> case fail as it was lacking a proper descriptor.
>
> I took this opportunity to fix two lines of whitespace
> errors in related code as I was anyway messing around with
> it.
>
> Cc: stable@kernel.org
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> Hi Sam, this is a regression and as such should go into the
> -rc series. As you can see I also added the Cc: stable tag.
>
> Yours,
> Linus Walleij
> ---
> drivers/mfd/db8500-prcmu.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
> index dc8826d..fcac8e0 100644
> --- a/drivers/mfd/db8500-prcmu.c
> +++ b/drivers/mfd/db8500-prcmu.c
> @@ -2524,7 +2524,7 @@ static bool read_mailbox_0(void)
>
> for (n = 0; n < NUM_PRCMU_WAKEUPS; n++) {
> if (ev & prcmu_irq_bit[n])
> - generic_handle_irq(IRQ_PRCMU_BASE + n);
> + generic_handle_irq(irq_create_mapping(db8500_irq_domain,n));

I thought you were fixing whitespace errors, not introducing them --^

=:-)

> }
> r = true;
> break;
> @@ -2737,13 +2737,13 @@ static int db8500_irq_map(struct irq_domain *d, unsigned int virq,
> }
>
> static struct irq_domain_ops db8500_irq_ops = {
> - .map = db8500_irq_map,
> - .xlate = irq_domain_xlate_twocell,
> + .map = db8500_irq_map,
> + .xlate = irq_domain_xlate_twocell,

That's strange. I wrote this, but have always used 8 space tabbing. :|

> };
>
> static int db8500_irq_init(struct device_node *np)
> {
> - int irq_base = -1;
> + int irq_base = 0;
>
> /* In the device tree case, just take some IRQs */
> if (!np)
> --
> 1.7.11.3
>

Besides the whitespace error it looks good.

Acked-by: Lee Jones <lee.jones@linaro.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-12-19 17:01    [W:1.771 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site