From patchwork Fri Dec 11 11:04:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Jenkins X-Patchwork-Id: 66586 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBBB4rVg010636 for ; Fri, 11 Dec 2009 11:04:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756803AbZLKLEp (ORCPT ); Fri, 11 Dec 2009 06:04:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756840AbZLKLEp (ORCPT ); Fri, 11 Dec 2009 06:04:45 -0500 Received: from mail-fx0-f221.google.com ([209.85.220.221]:47567 "EHLO mail-fx0-f221.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756803AbZLKLEo (ORCPT ); Fri, 11 Dec 2009 06:04:44 -0500 Received: by fxm21 with SMTP id 21so851872fxm.1 for ; Fri, 11 Dec 2009 03:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=DnhBIwgI6NPQXGd9GkIBnS/zpyPoZNANyFXBsDMfNoU=; b=LQ/pBUDEbmhXCHsUxG8bCFicMjBbR8eqRfJo1d1KwWYwrih/nd3GW+NAN0Xvf4gbwo fr6EO+oHeoFgSOdP2/d1QDJggDDORkqhHZUze5FPJgBzyzpEWPwku8Ni9tBu1pNYTebD JhQ/CvY0Pji9IShkOmoh+JsERzajd0Xh2TqD0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=qRFJzNuwSe9Kb51GSboWM+AkOW33xin+1nuQ9SQWFVbGnxMk9vuhiXQ8/sATdmYi+o bku44Em4lzUQ4mf7J8tsM6MkleTbpwiQYxN4ij9KuGZqCVVSO8FhDM0BvCKOVRLUaY/G AvRPHE6f1x7vTIhJqcz8wtQPvAkAEJmGVu1DI= Received: by 10.223.5.18 with SMTP id 18mr1225969fat.58.1260529490084; Fri, 11 Dec 2009 03:04:50 -0800 (PST) Received: from ?192.168.0.4? ([86.53.68.233]) by mx.google.com with ESMTPS id 13sm645045fxm.13.2009.12.11.03.04.43 (version=SSLv3 cipher=RC4-MD5); Fri, 11 Dec 2009 03:04:44 -0800 (PST) Message-ID: <4B22274A.1000003@tuffmail.co.uk> Date: Fri, 11 Dec 2009 11:04:42 +0000 From: Alan Jenkins User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Len Brown CC: linux acpi Subject: [PATCH 1/2] ACPI: battery: Fix CONFIG_ACPI_SYSFS_POWER=n Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 3f4602b..ed4aeab 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -522,13 +522,13 @@ static int acpi_battery_update(struct acpi_battery *battery) result = acpi_battery_get_status(battery); if (result) return result; -#ifdef CONFIG_ACPI_SYSFS_POWER if (!acpi_battery_present(battery)) { +#ifdef CONFIG_ACPI_SYSFS_POWER sysfs_remove_battery(battery); +#endif battery->update_time = 0; return 0; } -#endif if (!battery->update_time || old_present != acpi_battery_present(battery)) { result = acpi_battery_get_info(battery);