summaryrefslogtreecommitdiff
path: root/drivers/power/power_supply.h
diff options
context:
space:
mode:
authorAnton Vorontsov <cbouatmailru@gmail.com>2010-05-18 21:49:51 +0200
committerAnton Vorontsov <cbouatmailru@gmail.com>2010-05-19 12:14:28 +0400
commit5f487cd34f4337f9bc27ca19da72a39d1b0a0ab4 (patch)
treef3204e0cf64a7202c42d1f397fd978ccd61f8225 /drivers/power/power_supply.h
parenta1e50fd4452b2ed57376ece465a17276b59fad9c (diff)
power_supply: Use attribute groups
This fixes a race between power supply device and initial attributes creation, plus makes it possible to implement writable properties. [Daniel Mack - removed superflous return statement and dropped .mode attribute from POWER_SUPPLY_ATTR] Suggested-by: Greg KH <gregkh@suse.de> Suggested-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Tested-by: Daniel Mack <daniel@caiaq.de>
Diffstat (limited to 'drivers/power/power_supply.h')
-rw-r--r--drivers/power/power_supply.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/power/power_supply.h b/drivers/power/power_supply.h
index f38ba482be75..018de2b26998 100644
--- a/drivers/power/power_supply.h
+++ b/drivers/power/power_supply.h
@@ -12,15 +12,12 @@
#ifdef CONFIG_SYSFS
-extern int power_supply_create_attrs(struct power_supply *psy);
-extern void power_supply_remove_attrs(struct power_supply *psy);
+extern void power_supply_init_attrs(struct device_type *dev_type);
extern int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env);
#else
-static inline int power_supply_create_attrs(struct power_supply *psy)
-{ return 0; }
-static inline void power_supply_remove_attrs(struct power_supply *psy) {}
+static inline void power_supply_init_attrs(struct device_type *dev_type) {}
#define power_supply_uevent NULL
#endif /* CONFIG_SYSFS */