Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp301681pxx; Thu, 29 Oct 2020 03:03:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxky+G3BUMkphFVIKLepL7+khGaXPTY/xwpDhJu+3atLObPFW7ZjH1cTfEML/ARh9Cw7ld3 X-Received: by 2002:a50:b584:: with SMTP id a4mr3132812ede.301.1603965812787; Thu, 29 Oct 2020 03:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603965812; cv=none; d=google.com; s=arc-20160816; b=O0NUYRBcPBXU8ggGTpcQIRPy/tPr7ZqG8e4DpbITTJtoqja4tYX3Dx5vrDhkAG0vFv P9RWFSBD6tHLY7l9XQlrHmz3yuSKfNF6T4NkQE1bBi8+YUon5hoBjsc0Rtek+kaMHDQ9 mEQhQS+zugrqtUe6C3iZIEEzxJsth7CiMor7EEODnM1ehFjFDAxEzGYa+HVH31VaMvDR kP8BQmrmM8lFfnCTigXmH9zVKBslXy2WKgvHePXyYsCDAKYmZwhKHqa/SqKCQj0o0NjV Zo40dYzgyc9Vi3BMTDXplmp4UeN45bRyJzpJZYrco05kI3UIoeV4qDSCK3IExSNo0frU FGRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WIpei+B+VHOg39SkSPrnwtHwn/6hCUq/JOAs6UCcngk=; b=0vBBN5QnWUzrQXEjyaH1PSnjV8ML43qkj+iKL70I5c/VEarjgTvaayaQQjM3Qg9Vkw RbZMHLdLKydgLPmTrkZhnUq7p5/pzSEp7jkzHEysWvdkDUz51ESiTTE5BVeRLtPSyrXW F51oIh9TJrjqTpS+plLow7MSMnZATrOxKDbvkfM6RvFgSeDJ+p6LKwIK0iKhXc9zXIZM kkm6klkm5I3YcpGtqE2Hre5RIvpAXpv2g5ywEfh69vE2vump0cwcZEqcvL00qd2hn6y1 vhWaQdf2LNaKIHYUfduQW2M4GAqN9G8Ck8GoGEzPAW3jiw9HdrigWB22gh6aum5i2v5I bxkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f21si1206061ejh.250.2020.10.29.03.03.09; Thu, 29 Oct 2020 03:03:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726998AbgJ2J6F (ORCPT + 99 others); Thu, 29 Oct 2020 05:58:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726847AbgJ2J6E (ORCPT ); Thu, 29 Oct 2020 05:58:04 -0400 Received: from smtp3-1.goneo.de (smtp3.goneo.de [IPv6:2001:1640:5::8:37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FA01C0613D7 for ; Thu, 29 Oct 2020 02:58:04 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.goneo.de (Postfix) with ESMTP id 38D1023FA95; Thu, 29 Oct 2020 10:58:03 +0100 (CET) X-Virus-Scanned: by goneo X-Spam-Flag: NO X-Spam-Score: -2.947 X-Spam-Level: X-Spam-Status: No, score=-2.947 tagged_above=-999 tests=[ALL_TRUSTED=-1, AWL=-0.047, BAYES_00=-1.9] autolearn=ham Received: from smtp3.goneo.de ([127.0.0.1]) by localhost (smtp3.goneo.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uLMD6WxIdS9b; Thu, 29 Oct 2020 10:58:01 +0100 (CET) Received: from lem-wkst-02.lemonage.de. (hq.lemonage.de [87.138.178.34]) by smtp3.goneo.de (Postfix) with ESMTPA id BDC4023F9D3; Thu, 29 Oct 2020 10:58:01 +0100 (CET) From: poeschel@lemonage.de To: Miguel Ojeda Sandonis , linux-kernel@vger.kernel.org (open list) Cc: Lars Poeschel , Willy Tarreau Subject: [PATCH v5 13/25] auxdisplay: Make use of enum for backlight on / off Date: Thu, 29 Oct 2020 10:57:17 +0100 Message-Id: <20201029095731.311528-12-poeschel@lemonage.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201029095731.311528-1-poeschel@lemonage.de> References: <20201029095231.311083-1-poeschel@lemonage.de> <20201029095731.311528-1-poeschel@lemonage.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lars Poeschel To turn the backlight on or off use our new enum CHARLCD_ON / CHARLCD_OFF. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 154419513186..9631f70e8128 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -115,7 +115,7 @@ static void charlcd_bl_off(struct work_struct *work) if (priv->bl_tempo) { priv->bl_tempo = false; if (!(priv->flags & LCD_FLAG_L)) - priv->lcd.ops->backlight(&priv->lcd, 0); + priv->lcd.ops->backlight(&priv->lcd, CHARLCD_OFF); } mutex_unlock(&priv->bl_tempo_lock); } @@ -132,7 +132,7 @@ void charlcd_poke(struct charlcd *lcd) mutex_lock(&priv->bl_tempo_lock); if (!priv->bl_tempo && !(priv->flags & LCD_FLAG_L)) - lcd->ops->backlight(lcd, 1); + lcd->ops->backlight(lcd, CHARLCD_ON); priv->bl_tempo = true; schedule_delayed_work(&priv->bl_work, LCD_BL_TEMPO_PERIOD * HZ); mutex_unlock(&priv->bl_tempo_lock); @@ -829,7 +829,7 @@ int charlcd_unregister(struct charlcd *lcd) the_charlcd = NULL; if (lcd->ops->backlight) { cancel_delayed_work_sync(&priv->bl_work); - priv->lcd.ops->backlight(&priv->lcd, 0); + priv->lcd.ops->backlight(&priv->lcd, CHARLCD_OFF); } return 0; -- 2.28.0