From patchwork Mon Oct 30 10:04:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Eckert X-Patchwork-Id: 739991 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55635C4332F for ; Mon, 30 Oct 2023 10:16:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232777AbjJ3KQX (ORCPT ); Mon, 30 Oct 2023 06:16:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232860AbjJ3KPx (ORCPT ); Mon, 30 Oct 2023 06:15:53 -0400 Received: from mxout70.expurgate.net (mxout70.expurgate.net [194.37.255.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D3B176B1 for ; Mon, 30 Oct 2023 03:04:56 -0700 (PDT) Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1qxP8g-00Fat6-Nt for linux-serial@vger.kernel.org; Mon, 30 Oct 2023 11:04:54 +0100 Received: from [195.243.126.94] (helo=securemail.tdt.de) by relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qxP8g-005EaB-CP for linux-serial@vger.kernel.org; Mon, 30 Oct 2023 11:04:54 +0100 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id 24511240050 for ; Mon, 30 Oct 2023 11:04:54 +0100 (CET) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id DAEF2240052; Mon, 30 Oct 2023 11:04:53 +0100 (CET) Received: from localhost.localdomain (unknown [10.2.3.40]) by mail.dev.tdt.de (Postfix) with ESMTPSA id A191F215D4; Mon, 30 Oct 2023 11:04:53 +0100 (CET) From: Florian Eckert To: Eckert.Florian@googlemail.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, pavel@ucw.cz, lee@kernel.org, kabel@kernel.org, u.kleine-koenig@pengutronix.de, m.brock@vanmierlo.com Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-leds@vger.kernel.org Subject: [Patch v6 4/7] leds: ledtrig-tty: change logging if get icount failed Date: Mon, 30 Oct 2023 11:04:44 +0100 Message-ID: <20231030100447.63477-5-fe@dev.tdt.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231030100447.63477-1-fe@dev.tdt.de> References: <20231030100447.63477-1-fe@dev.tdt.de> MIME-Version: 1.0 X-purgate-ID: 151534::1698660294-A0B71DE9-93AF2910/0/0 X-purgate-type: clean X-purgate: clean Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Change the log level from info to warn, because there is something wrong. That is more a warn message than an info message. While we are at it, the device prefix is also changed, as this is the led device and not the tty device that generates this message. Signed-off-by: Florian Eckert --- drivers/leds/trigger/ledtrig-tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/leds/trigger/ledtrig-tty.c b/drivers/leds/trigger/ledtrig-tty.c index 3e69a7bde928..86595add72cd 100644 --- a/drivers/leds/trigger/ledtrig-tty.c +++ b/drivers/leds/trigger/ledtrig-tty.c @@ -83,6 +83,7 @@ static void ledtrig_tty_work(struct work_struct *work) struct ledtrig_tty_data *trigger_data = container_of(work, struct ledtrig_tty_data, dwork.work); struct serial_icounter_struct icount; + struct led_classdev *led_cdev = trigger_data->led_cdev; int ret; mutex_lock(&trigger_data->mutex); @@ -117,7 +118,7 @@ static void ledtrig_tty_work(struct work_struct *work) ret = tty_get_icount(trigger_data->tty, &icount); if (ret) { - dev_info(trigger_data->tty->dev, "Failed to get icount, stopped polling\n"); + dev_warn(led_cdev->dev, "Failed to get icount, stop polling\n"); mutex_unlock(&trigger_data->mutex); return; } @@ -126,8 +127,7 @@ static void ledtrig_tty_work(struct work_struct *work) icount.tx != trigger_data->tx) { unsigned long interval = LEDTRIG_TTY_INTERVAL; - led_blink_set_oneshot(trigger_data->led_cdev, &interval, - &interval, 0); + led_blink_set_oneshot(led_cdev, &interval, &interval, 0); trigger_data->rx = icount.rx; trigger_data->tx = icount.tx;