From patchwork Tue Mar 11 17:58:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandr Mezin X-Patchwork-Id: 3813671 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1741FBF540 for ; Tue, 11 Mar 2014 18:01:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B04F32020E for ; Tue, 11 Mar 2014 18:01:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E3A2B20204 for ; Tue, 11 Mar 2014 18:01:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753752AbaCKSBn (ORCPT ); Tue, 11 Mar 2014 14:01:43 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:52755 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753189AbaCKSBm (ORCPT ); Tue, 11 Mar 2014 14:01:42 -0400 Received: by mail-lb0-f180.google.com with SMTP id 10so5945524lbg.11 for ; Tue, 11 Mar 2014 11:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oWcIrC/74A3rq880G22C9Nny1twyln2CAiNFPMn0sjw=; b=mupTn2nwDLqX3y/yOxSc1RK4iX4E3Tzi+b3u5RG4peCyMnABBwT/GmoBnddhtuNuJI 10G9TDhKiClMUgNU/D3RqnOboTQO41qgPIER/SwP6/vj4aLif/2TUZSvxkwqVlhG3gdj BStdDK4WMvECDg2GCeae7x30l9wXVC2Y2E3QR2zztTIKtD6/GJutaHze77/nFPrCKTBW spi03cwJCXkXzGpwGnQNhrhDqEuJCQKKcEalADCzmrX0vHe2UpZwZQYqwhvRbZ9xBEQa pBHkrgpGmMGcDDAp3ePOo8FPx7NlUXmb5CNith/IDtCrqQrv2LvG3BpdSlFHpQvhgA/V QyTA== X-Received: by 10.112.22.196 with SMTP id g4mr2367652lbf.47.1394560900457; Tue, 11 Mar 2014 11:01:40 -0700 (PDT) Received: from localhost.localdomain ([188.232.137.148]) by mx.google.com with ESMTPSA id x4sm25908186lbn.2.2014.03.11.11.01.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Mar 2014 11:01:39 -0700 (PDT) From: Alexander Mezin To: linux-acpi@vger.kernel.org Cc: Alexander Mezin Subject: [PATCH 2/3] ACPI / battery: call ACPI notifier chain in acpi_battery_notify Date: Wed, 12 Mar 2014 00:58:47 +0700 Message-Id: <1394560728-14048-2-git-send-email-mezin.alexander@gmail.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1394560728-14048-1-git-send-email-mezin.alexander@gmail.com> References: <1394560728-14048-1-git-send-email-mezin.alexander@gmail.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Allow other drivers to subscribe to battery status notifications. Just like AC driver does. Signed-off-by: Alexander Mezin --- drivers/acpi/battery.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index bfec70f..9a2c63b 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -734,6 +734,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event) acpi_bus_generate_netlink_event(device->pnp.device_class, dev_name(&device->dev), event, acpi_battery_present(battery)); + acpi_notifier_call_chain(device, event, acpi_battery_present(battery)); /* acpi_battery_update could remove power_supply object */ if (old && battery->bat.dev) power_supply_changed(&battery->bat);