]> Pileus Git - ~andy/linux/blobdiff - drivers/power/olpc_battery.c
Merge branch 'for-3.3' of git://linux-nfs.org/~bfields/linux
[~andy/linux] / drivers / power / olpc_battery.c
index dc60f61a3b9ec4275e660ab1faab658db16a1bdc..7385092f9bc8a98a8dc09155238d6ee924ab6034 100644 (file)
@@ -525,14 +525,6 @@ static struct power_supply olpc_bat = {
        .use_for_apm = 1,
 };
 
-void olpc_battery_trigger_uevent(unsigned long cause)
-{
-       if (cause & EC_SCI_SRC_ACPWR)
-               kobject_uevent(&olpc_ac.dev->kobj, KOBJ_CHANGE);
-       if (cause & (EC_SCI_SRC_BATERR|EC_SCI_SRC_BATSOC|EC_SCI_SRC_BATTERY))
-               kobject_uevent(&olpc_bat.dev->kobj, KOBJ_CHANGE);
-}
-
 static int olpc_battery_suspend(struct platform_device *pdev,
                                pm_message_t state)
 {
@@ -638,17 +630,7 @@ static struct platform_driver olpc_battery_driver = {
        .suspend = olpc_battery_suspend,
 };
 
-static int __init olpc_bat_init(void)
-{
-       return platform_driver_register(&olpc_battery_driver);
-}
-module_init(olpc_bat_init);
-
-static void __exit olpc_bat_exit(void)
-{
-       platform_driver_unregister(&olpc_battery_driver);
-}
-module_exit(olpc_bat_exit);
+module_platform_driver(olpc_battery_driver);
 
 MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
 MODULE_LICENSE("GPL");