From patchwork Tue Jun 30 14:36:16 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Jenkins X-Patchwork-Id: 33119 X-Patchwork-Delegate: astarikovskiy@suse.de 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 n5UEaNdv021186 for ; Tue, 30 Jun 2009 14:36:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752986AbZF3OgS (ORCPT ); Tue, 30 Jun 2009 10:36:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753344AbZF3OgS (ORCPT ); Tue, 30 Jun 2009 10:36:18 -0400 Received: from ey-out-1920.google.com ([74.125.78.150]:2515 "EHLO ey-out-1920.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbZF3OgS (ORCPT ); Tue, 30 Jun 2009 10:36:18 -0400 Received: by ey-out-1920.google.com with SMTP id 3so45838eyh.36 for ; Tue, 30 Jun 2009 07:36:20 -0700 (PDT) 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:references:in-reply-to :content-type:content-transfer-encoding; bh=BZP6SBVCxTQSQz2KQKGGjNSziQROjZDWc/lYBIck8jo=; b=FulS6S/keR3RpODW6KVwKjgOxSdXXdDkozTSxoRuwNqtEUqMys0Kwz8CpXjgfG9jpA SbMEanCefMVeSnsdqSWySV/x59h2pXOMMlPq1FOwy6yo46T/h64Lva8fiE6owLVjaClR K8cbfOFp9nUTypPvTlfG9EeKOR3gheN/aCoXQ= 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 :references:in-reply-to:content-type:content-transfer-encoding; b=Jz18O3T9tH2BgYELUVauK2elE7FSNbsXTWA3DWzV/qA1nT1yKPT0fsbZ9Fxp6i/1RT k5JgqVDBk7oQdKUvO3x6xt2r6vtCCCA0Z7PEuSpXJzgF/XjQxrjoinlMz8Imrj5Lvr1h Bv4bKynd4sApuD2ToZrRGS8KtMbqCNGh24HzA= Received: by 10.210.81.9 with SMTP id e9mr2804139ebb.42.1246372580750; Tue, 30 Jun 2009 07:36:20 -0700 (PDT) Received: from ?192.168.0.4? ([86.53.68.233]) by mx.google.com with ESMTPS id 10sm298023eyd.8.2009.06.30.07.36.19 (version=SSLv3 cipher=RC4-MD5); Tue, 30 Jun 2009 07:36:20 -0700 (PDT) Message-ID: <4A4A22E0.6050400@tuffmail.co.uk> Date: Tue, 30 Jun 2009 15:36:16 +0100 From: Alan Jenkins User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: linux acpi CC: Alexey Starikovskiy Subject: [RESEND] [PATCH 2/3] ACPI: battery drivers should call power_supply_changed() References: <4A4A219C.2020802@tuffmail.co.uk> <4A4A2299.8060401@tuffmail.co.uk> In-Reply-To: <4A4A2299.8060401@tuffmail.co.uk> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Calling kobject_uevent() directly is a layering violation. In particular, it means we'll miss updating the generic LED trigger. Signed-off-by: Alan Jenkins CC: Alexey Starikovskiy --- drivers/acpi/battery.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 908edce..7d31a23 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -811,7 +811,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event) #ifdef CONFIG_ACPI_SYSFS_POWER /* acpi_batter_update could remove power_supply object */ if (battery->bat.dev) - kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE); + power_supply_changed(&battery->bat); #endif }