Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2310293ybg; Fri, 5 Jun 2020 10:36:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy7IojD2Oo4HoVrlnaiuFQUsZNa0I/vGEXukAKuhp8QOxia7YV/69sZvNYVypUAW3qpg88 X-Received: by 2002:a05:6402:1604:: with SMTP id f4mr10657654edv.379.1591378580758; Fri, 05 Jun 2020 10:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591378580; cv=none; d=google.com; s=arc-20160816; b=SygabmeneQwePk3M95ZHaC3ZUnYawtmUjVIfpEmVlFTEDexDGWSyhOh+RJZi/NoHIZ cAyLeM/KpOOLXfqR5O/b99M6thq2IBArnf1Y3jZ1FKLejEJ4NOXZ5HbrMCGU7YeD+Cm/ 4SqvbmZaJx4mwaFyMO3opY0wVBt2t8kLJalcFseBceTfv9tjyK0+q5ZtWGVO+JK8MGsX ULQVFrrrO450jLNWgQGaA2bhz7+ILIMbmQr3GBMhig7BlXVgLUI/z+MLZ7/DsJ8/gIsh vQ4Pp0HkvdB7IN2uPAff0pm+Y+IknUPh6uESgSgDafOmGB7WZDkLk5MP8pKXDmCY6oxg NCyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=WpgKCVgrfSJ1acIFfL+CCwCs05bHl5ODIQ9M8n/CSnA=; b=W5DVjxIFH3Oa10p66HEKtoYuvPNMuE5LdFERbWnnG4ZASxXx8kIAmFK355aXSrXgqP C3sutAw3N+MXRPsOKAYtKc66mnlwXk6K29OCmHG8ZXG8bDVjOLn8Rf7aOsUdpKX4cPJR 58zFsMl9C+esJwemAd4C1b1V6zUA6i9jy6G+/G+LIFGOvn914+HxB/i9dK/mvV/WNctl LbwFmSAG4ll5SfLjwBt7wjI3U6TYu2eped7T4d6qA7/TfMwc6qtFJujM8V195LGEXavC Byc2fP8g8SHgVBbRPbiFlFfphiq3xfqifxfXzVRenRdSmUBRuqeTrazAgpTOYmJIkTL2 NgUw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si3945624edq.15.2020.06.05.10.35.58; Fri, 05 Jun 2020 10:36:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728146AbgFEReB (ORCPT + 99 others); Fri, 5 Jun 2020 13:34:01 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39248 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728031AbgFERd4 (ORCPT ); Fri, 5 Jun 2020 13:33:56 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: andrzej.p) with ESMTPSA id E9D2F2A5086 From: Andrzej Pietrasiewicz To: linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-input@vger.kernel.org, linux-tegra@vger.kernel.org, patches@opensource.cirrus.com, ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Cc: "Rafael J . Wysocki" , Len Brown , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Kukjin Kim , Krzysztof Kozlowski , Dmitry Torokhov , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Vladimir Zapolskiy , Sylvain Lemieux , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Barry Song , Michael Hennerich , Nick Dyer , Hans de Goede , Ferruh Yigit , Sangwon Jee , Peter Hutterer , Henrique de Moraes Holschuh , Andrzej Pietrasiewicz , kernel@collabora.com Subject: [PATCH v3 4/7] ACPI: button: Use input_device_enabled() helper Date: Fri, 5 Jun 2020 19:33:32 +0200 Message-Id: <20200605173335.13753-5-andrzej.p@collabora.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200605173335.13753-1-andrzej.p@collabora.com> References: <20200604072853.GP89269@dtor-ws> <20200605173335.13753-1-andrzej.p@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A new helper is available, so use it. Signed-off-by: Andrzej Pietrasiewicz --- drivers/acpi/button.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index ff7ab291f678..4deb2b48d03c 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -411,7 +411,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) input = button->input; if (button->type == ACPI_BUTTON_TYPE_LID) { mutex_lock(&button->input->mutex); - users = button->input->users; + users = input_device_enabled(button->input); mutex_unlock(&button->input->mutex); if (users) acpi_lid_update_state(device, true); @@ -460,7 +460,7 @@ static int acpi_button_resume(struct device *dev) button->suspended = false; mutex_lock(&input->mutex); - if (button->type == ACPI_BUTTON_TYPE_LID && input->users) { + if (button->type == ACPI_BUTTON_TYPE_LID && input_device_enabled(input)) { button->last_state = !!acpi_lid_evaluate_state(device); button->last_time = ktime_get(); acpi_lid_initialize_state(device); -- 2.17.1