From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
To: Len Brown <lenb@kernel.org>
Cc: linux acpi <linux-acpi@vger.kernel.org>
Subject: [PATCH 2/2] ACPI: battery drivers should call power_supply_changed()
Date: Fri, 11 Dec 2009 11:05:55 +0000 [thread overview]
Message-ID: <4B222793.3020902@tuffmail.co.uk> (raw)
In-Reply-To: <4B22274A.1000003@tuffmail.co.uk>
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 <alan-jenkins@tuffmail.co.uk>
CC: Alexey Starikovskiy <astarikovskiy@suse.de>
---
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 ed4aeab..ec3138c 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -833,7 +833,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
}
--
1.6.3.3
prev parent reply other threads:[~2009-12-11 11:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 11:04 [PATCH 1/2] ACPI: battery: Fix CONFIG_ACPI_SYSFS_POWER=n Alan Jenkins
2009-12-11 11:05 ` Alan Jenkins [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B222793.3020902@tuffmail.co.uk \
--to=alan-jenkins@tuffmail.co.uk \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox