From patchwork Tue Feb 4 08:21:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 3574291 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B7CD5C02DC for ; Tue, 4 Feb 2014 08:25:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED5B520170 for ; Tue, 4 Feb 2014 08:25:35 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13E4320166 for ; Tue, 4 Feb 2014 08:25:35 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAbJt-0004Fs-Oh; Tue, 04 Feb 2014 08:25:25 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAbJr-0007Ul-5s; Tue, 04 Feb 2014 08:25:23 +0000 Received: from mail-we0-f179.google.com ([74.125.82.179]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAbJn-0007SD-Nd for linux-arm-kernel@lists.infradead.org; Tue, 04 Feb 2014 08:25:21 +0000 Received: by mail-we0-f179.google.com with SMTP id q58so3651714wes.24 for ; Tue, 04 Feb 2014 00:24:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WKH47NPA48TSpW6KxAyq89Efily0uASnkrt9zQlQVTg=; b=EeyNF/0Ml3GNqr372fcAW4uW1hiYbDzOx6A61avtuzEhPEjbrT2YP4s6ylxcgNMthG ntCN8MLvgc4Cg+Bgs6pFKVtTwppDAi55o4Qm3XozNsd85RMKc5uR6XYNrJvPKY4JPHvC JA9uyzTgh0Q/NMYgp9N/0BT7hkG1CMIvimTttkuCn4d0FST8NwFxYoFj586qYUtEjEFL xloak28sxJ7GEMuinnu3T4RwdDV5FGteYKyzpRQoWDZRmHhwUhIGdCvxIp37Fcn9NeFo a2gSXN+jA/5wXCYCVdVhb0mv4udPPDZCU4EMlMVlF7+ewCVrChsxlR6x7wE4Mjby6UPm dTTQ== X-Received: by 10.181.11.169 with SMTP id ej9mr11698786wid.18.1391502293077; Tue, 04 Feb 2014 00:24:53 -0800 (PST) Received: from stedf17-labo202.ds.jdsu.net. (4-161.80-90.static-ip.oleane.fr. [90.80.161.4]) by mx.google.com with ESMTPSA id e5sm50545474wja.15.2014.02.04.00.24.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Feb 2014 00:24:52 -0800 (PST) From: Jean-Jacques Hiblot To: b.brezillon@overkiz.com, nicolas.ferre@atmel.com Subject: [PATCH v2] at91: pmc: Fixed irq's name allocation for programmable clocks Date: Tue, 4 Feb 2014 09:21:45 +0100 Message-Id: <1391502105-24612-1-git-send-email-jjhiblot@traphandler.com> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1391445961-20755-1-git-send-email-jjhiblot@traphandler.com> References: <1391445961-20755-1-git-send-email-jjhiblot@traphandler.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140204_032519_934683_00323811 X-CRM114-Status: UNSURE ( 9.70 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: Jean-Jacques Hiblot , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Boris BREZILLON Acked-by: Boris BREZILLON Acked-by: Nicolas Ferre --- 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);