Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1167511rwb; Fri, 28 Jul 2023 05:56:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlE5X+ZTknVZcn9LukfkI7+vsWkeOt0dBMc40XfIfrbvpYo28cBe8DtUjAb4HTa654I401m4 X-Received: by 2002:a17:902:db08:b0:1b8:a277:4b5b with SMTP id m8-20020a170902db0800b001b8a2774b5bmr1411995plx.7.1690548964320; Fri, 28 Jul 2023 05:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690548964; cv=none; d=google.com; s=arc-20160816; b=EPfckA6wXg5uzQgXCO7z1hpTwHrfUDqTHrCbV8bfPI8rkpJhrLHaH4H6rN7NQ4eScQ jWrlxoaStCprcS/R5AwLmJmsr5LOMi5m5vPbJTwHUg9CTU+OVi47R0wUn20OU/FIYfhn hX3UF4PGT3xXWH4kvZZxTBsio4+tUCZVfsrVXUtzPeD4OypJhnyKU/JurNTpBMUSjJ9H 8xdtrE5ntYIksScvmsDndkga6UHXSH3T3oc879fv1M8NZuZPlphmeJxbmO3tl/EF0uBC g9YnzeUzuKOFJ9ikGFfF9bW3G798GEQHBu70GTL/xi7UD53oWB4rg4m5TU3cO6op1p8i HKpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date; bh=Q+IKxVOnN5iNmEaAVUcqXnDTnmBHpXXICSNDsx/H3DM=; fh=ZqLowDVvVpVxcrlw7MM/IM9y2WQ53COJXAUeTF8s64E=; b=s61yADlOx9s8SaLZ79BT+dBIVIJ4qkGu+xngcfdsXN7M36pU2ZO0BhNLq2PGLx8xR4 29qghwFY+fz7JkeSsY8Xd6E5qdpl2cH9EqGTy2axmmgsNPYgRay2Xqo1TmFvg2WChbUe HPUBtqpJFlgq/BFBGRZ6n4UxQxdrxHfaHamsw/Q2qTlT1DjEIA/aVaMNi0LTBt572mzP V8O58ZcHVdLvQc9ydufVXZluD4HEx/Kz6ukHvQJZhCdfLGp8zOI5YtJieHoVdcmgl1qz ElIr9+Mm0+reNFvgskhtkhKwPYSClsvMnhATrOMRGN3jXKrlJMWHVDCG3Bauh3EIMhKc FvEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l16-20020a170903121000b001b9e912c588si3166782plh.117.2023.07.28.05.55.51; Fri, 28 Jul 2023 05:56:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235444AbjG1Mba (ORCPT + 99 others); Fri, 28 Jul 2023 08:31:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235314AbjG1Mb2 (ORCPT ); Fri, 28 Jul 2023 08:31:28 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4FBB10FC; Fri, 28 Jul 2023 05:31:27 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1qPMck-0003Lx-2p; Fri, 28 Jul 2023 12:31:14 +0000 Date: Fri, 28 Jul 2023 13:30:58 +0100 From: Daniel Golle To: Pavel Machek , Lee Jones , Daniel Golle , Johannes Berg , Andrew Morton , Richard Purdie , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] led: trig: timer: stop offloading on deactivation Message-ID: <728da6e11d34a39f717be07e246dcc4964b0fd51.1690542871.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Stop hardware blinking when switching from 'timer' to another trigger. Fixes: 5ada28bf7675 ("led-class: always implement blinking") Signed-off-by: Daniel Golle --- drivers/leds/trigger/ledtrig-timer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/leds/trigger/ledtrig-timer.c b/drivers/leds/trigger/ledtrig-timer.c index b4688d1d9d2b2..fb6b207b052b8 100644 --- a/drivers/leds/trigger/ledtrig-timer.c +++ b/drivers/leds/trigger/ledtrig-timer.c @@ -125,6 +125,8 @@ static void timer_trig_deactivate(struct led_classdev *led_cdev) { /* Stop blinking */ led_set_brightness(led_cdev, LED_OFF); + if (led_cdev->blink_set) + led_cdev->blink_set(led_cdev, 0, 0); } static struct led_trigger timer_led_trigger = { -- 2.41.0