From patchwork Thu Jun 12 14:00:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 359144 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 839DE14009E; Fri, 13 Jun 2014 00:00:26 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1Wv5YF-0001gA-FY; Thu, 12 Jun 2014 14:00:23 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1Wv5YA-0001aY-1s for kernel-team@lists.ubuntu.com; Thu, 12 Jun 2014 14:00:18 +0000 Received: from bl20-220-110.dsl.telepac.pt ([2.81.220.110] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Wv5Y9-0004xl-GS; Thu, 12 Jun 2014 14:00:17 +0000 From: Luis Henriques To: Oliver Hartkopp Subject: [3.11.y.z extended stable] Patch "can: only rename enabled led triggers when changing the netdev name" has been added to staging queue Date: Thu, 12 Jun 2014 15:00:15 +0100 Message-Id: <1402581615-16588-1-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 1.9.1 X-Extended-Stable: 3.11 Cc: Marc Kleine-Budde , Fabio Baltieri , Kurt Van Dijck , kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com This is a note to let you know that I have just added a patch titled can: only rename enabled led triggers when changing the netdev name to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.11.y.z tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Luis ------ From 7f8b52d01da74c7f80950a4f2074edeff685bb72 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Tue, 27 May 2014 13:30:56 +0200 Subject: can: only rename enabled led triggers when changing the netdev name commit 45fb4f8d81578e0a17c45c4593a3305afbf7a48b upstream. Commit a1ef7bd9fce8 ("can: rename LED trigger name on netdev renames") renames the led trigger names according to the changed netdevice name. As not every CAN driver supports and initializes the led triggers, checking for the CAN private datastructure with safe_candev_priv() in the notifier chain is not enough. This patch adds a check when CONFIG_CAN_LEDS is enabled and the driver does not support led triggers. For stable 3.9+ Cc: Fabio Baltieri Signed-off-by: Oliver Hartkopp Acked-by: Kurt Van Dijck Signed-off-by: Marc Kleine-Budde Signed-off-by: Luis Henriques --- drivers/net/can/led.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 diff --git a/drivers/net/can/led.c b/drivers/net/can/led.c index a3d99a8fd2d1..ab7f1b01be49 100644 --- a/drivers/net/can/led.c +++ b/drivers/net/can/led.c @@ -97,6 +97,9 @@ static int can_led_notifier(struct notifier_block *nb, unsigned long msg, if (!priv) return NOTIFY_DONE; + if (!priv->tx_led_trig || !priv->rx_led_trig) + return NOTIFY_DONE; + if (msg == NETDEV_CHANGENAME) { snprintf(name, sizeof(name), "%s-tx", netdev->name); led_trigger_rename_static(name, priv->tx_led_trig);