From patchwork Sun Jul 4 22:26:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luke D. Jones" X-Patchwork-Id: 12357697 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4114BC07E95 for ; Sun, 4 Jul 2021 22:27:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09036613E9 for ; Sun, 4 Jul 2021 22:27:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229642AbhGDW3o (ORCPT ); Sun, 4 Jul 2021 18:29:44 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:59615 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbhGDW3o (ORCPT ); Sun, 4 Jul 2021 18:29:44 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 506D33200925; Sun, 4 Jul 2021 18:27:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 04 Jul 2021 18:27:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=PC3LkJ0XYgyYX4Ygc mVWDDEY9mKV/iXktNtOtqHoJ3Q=; b=vrDfbUUyUDyWYCcSgTPTmGeljJffbIkYL QANhIk2XkTbjucDSsh0C+oQNvLgN/TaJqGZXP7VRUI8Al00FcB8GC43e+1JzyDYS w80sa04IirkYFK09E6JD6a1DP/0jdQ6UaSu9VWybTCua3yzs171WpByZwawfb/tS eF3WP5UqGj4yqcNZHNAOxfYYBZ4vhHFoLgS/2+fEKe+SOMOGEbCZUMeTXL8foQCe CbvQN2edT1lCcNV0OH72o2ScJOzAAELiLDkI5kl0dpnoqk1mzm0KWz3Wy1eVMEQo jQKgPFDJJoncEnUBn/oK58uWSFipIlhRL1kPege+J0uOHkJmwOkEQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeejfedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepfdfnuhhkvgcuffdrucflohhnvghsfdcuoehluhhkvgeslhhjohhn vghsrdguvghvqeenucggtffrrghtthgvrhhnpeelffelhfeltdfhtdevuefgveeuueekge etiefgiefhgfejvdetvdeuvedthfdvkeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehluhhkvgeslhhjohhnvghsrdguvghv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 4 Jul 2021 18:27:05 -0400 (EDT) From: "Luke D. Jones" To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Luke D. Jones" Subject: [PATCH] HID: asus: Remove check for same LED brightness on set Date: Mon, 5 Jul 2021 10:26:59 +1200 Message-Id: <20210704222659.882193-1-luke@ljones.dev> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Remove the early return on LED brightness set so that any controller application, daemon, or desktop may set the same brightness at any stage. This is required because many ASUS ROG keyboards will default to max brightness on laptop resume if the LEDs were set to off before sleep. Signed-off-by: Luke D Jones --- drivers/hid/hid-asus.c | 3 --- 1 file changed, 3 deletions(-) -- 2.31.1 diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index 60606c11bdaf..19da81d2a910 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -486,9 +486,6 @@ static void asus_kbd_backlight_set(struct led_classdev *led_cdev, { struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, cdev); - if (led->brightness == brightness) - return; - led->brightness = brightness; schedule_work(&led->work); }