linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] at91: pmc: Fixed irq's name allocation for programmable clocks
Date: Tue, 4 Feb 2014 10:03:18 +0100	[thread overview]
Message-ID: <52F0ACD6.7020400@atmel.com> (raw)
In-Reply-To: <1391502105-24612-1-git-send-email-jjhiblot@traphandler.com>

On 04/02/2014 09:21, Jean-Jacques Hiblot :
> The name provided to request_irq() must be valid until the irq is released.
> This patch stores the name in the internal data structure.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks. Bye,

> ---
>  drivers/clk/at91/clk-programmable.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/clk/at91/clk-programmable.c b/drivers/clk/at91/clk-programmable.c
> index 8e242c7..799b75c 100644
> --- a/drivers/clk/at91/clk-programmable.c
> +++ b/drivers/clk/at91/clk-programmable.c
> @@ -44,6 +44,7 @@ struct clk_programmable {
>  	u8 css;
>  	u8 pres;
>  	u8 slckmck;
> +	char irq_name[11];
>  	const struct clk_programmable_layout *layout;
>  };
>  
> @@ -247,7 +248,6 @@ at91_clk_register_programmable(struct at91_pmc *pmc, unsigned int irq,
>  	struct clk_programmable *prog;
>  	struct clk *clk = NULL;
>  	struct clk_init_data init;
> -	char irq_name[11];
>  
>  	if (id > PROG_ID_MAX)
>  		return ERR_PTR(-EINVAL);
> @@ -269,9 +269,9 @@ at91_clk_register_programmable(struct at91_pmc *pmc, unsigned int irq,
>  	prog->irq = irq;
>  	init_waitqueue_head(&prog->wait);
>  	irq_set_status_flags(prog->irq, IRQ_NOAUTOEN);
> -	snprintf(irq_name, sizeof(irq_name), "clk-prog%d", id);
> +	snprintf(prog->irq_name, sizeof(prog->irq_name), "clk-prog%d", id);
>  	ret = request_irq(prog->irq, clk_programmable_irq_handler,
> -			  IRQF_TRIGGER_HIGH, irq_name, prog);
> +			  IRQF_TRIGGER_HIGH, prog->irq_name, prog);
>  	if (ret)
>  		return ERR_PTR(ret);
>  
> 


-- 
Nicolas Ferre

      parent reply	other threads:[~2014-02-04  9:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 16:46 [PATCH] at91: pmc: Fixed irq's name allocation for programmable clocks Jean-Jacques Hiblot
2014-02-03 17:13 ` boris brezillon
2014-02-04  8:21 ` [PATCH v2] " Jean-Jacques Hiblot
2014-02-04  8:29   ` Boris BREZILLON
2014-02-04  8:42   ` Boris BREZILLON
2014-02-04 13:57     ` Boris BREZILLON
2014-02-04  9:03   ` Nicolas Ferre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52F0ACD6.7020400@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).