From patchwork Sat Jan 4 02:07:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandr Mezin X-Patchwork-Id: 3432961 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 733D49F374 for ; Sat, 4 Jan 2014 02:08:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A8E120122 for ; Sat, 4 Jan 2014 02:08:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2DC5C20114 for ; Sat, 4 Jan 2014 02:08:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754235AbaADCIg (ORCPT ); Fri, 3 Jan 2014 21:08:36 -0500 Received: from mail-la0-f49.google.com ([209.85.215.49]:48684 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753866AbaADCIf (ORCPT ); Fri, 3 Jan 2014 21:08:35 -0500 Received: by mail-la0-f49.google.com with SMTP id er20so8374291lab.22 for ; Fri, 03 Jan 2014 18:08:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=DAykw98sEqcr10pX8+bLBfNwbGoKxIvZfleWxZZgSLs=; b=h/RvQHOgA4oCj8LuFPAcgETCYgkVIw684EGmzt6BvXqQgkvPEZ1cdu46KNiatJx3sa PXLHQdBMk8QgmYnfxqbHz1xLeCPz5ERbeNMHqpk2MREyQS5oQZ++5BdtgfX5yqN2VdW5 DWSarq5pDrM92+/aVicCAN8yVdt99MEcO7/divNq875NBYVNInn+Lkk1uZ17u97/KlCo cZmrcH8ty4qhCwNwh5Lbr0+O01ygsoiaW4rvxggTTymHDFbcnafnqNx8Otan62y6NJOh NVylmcJEmqLaniCCLF1/GDgwwSzIHEsQH8HHcx4jh4z7H8E77TRUOlImT7Vvq1s5usyw 4mMg== X-Received: by 10.152.170.199 with SMTP id ao7mr75413lac.40.1388801314362; Fri, 03 Jan 2014 18:08:34 -0800 (PST) Received: from localhost.localdomain ([188.232.109.41]) by mx.google.com with ESMTPSA id a8sm48403894lae.5.2014.01.03.18.08.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Jan 2014 18:08:32 -0800 (PST) From: Alexander Mezin To: linux-acpi@vger.kernel.org Cc: tianyu.lan@intel.com, Alexander Mezin Subject: [PATCH] ACPI / AC: change notification handler type to ACPI_ALL_NOTIFY Date: Sat, 4 Jan 2014 09:07:59 +0700 Message-Id: <1388801279-15502-1-git-send-email-mezin.alexander@gmail.com> X-Mailer: git-send-email 1.8.5.2 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With kernel 3.13rc5 there are no AC adapter notifications on my laptop. Commit cc8ef52707341e67a12067d6ead991d56ea017ca "ACPI / AC: convert ACPI ac driver to platform bus" changed the driver to listen only to device notifications. However, aml code on my laptop notifies the driver with zero event. This patch changes the driver to listen to all events again. References: https://bugzilla.kernel.org/show_bug.cgi?id=67821 Signed-off-by: Alexander Mezin --- drivers/acpi/ac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 8711e37..3c2e4aa 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c @@ -207,7 +207,7 @@ static int acpi_ac_probe(struct platform_device *pdev) goto end; result = acpi_install_notify_handler(ACPI_HANDLE(&pdev->dev), - ACPI_DEVICE_NOTIFY, acpi_ac_notify_handler, ac); + ACPI_ALL_NOTIFY, acpi_ac_notify_handler, ac); if (result) { power_supply_unregister(&ac->charger); goto end; @@ -255,7 +255,7 @@ static int acpi_ac_remove(struct platform_device *pdev) return -EINVAL; acpi_remove_notify_handler(ACPI_HANDLE(&pdev->dev), - ACPI_DEVICE_NOTIFY, acpi_ac_notify_handler); + ACPI_ALL_NOTIFY, acpi_ac_notify_handler); ac = platform_get_drvdata(pdev); if (ac->charger.dev)