X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fpower%2Fpower_supply_sysfs.c;h=49215da5249b1b96d540574d580f3322dc35e0b4;hb=56fa18e8f1ef6b3995a4511e61103d0f9205ff4a;hp=bab591ba785a0a492e98b4b3ecb95c29ede60261;hpb=839dc9f105c0d856f9a0be48fb3bd0982ff5df5b;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index bab591ba..49215da 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c @@ -48,7 +48,8 @@ static ssize_t power_supply_show_property(struct device *dev, "Unspecified failure" }; static char *technology_text[] = { - "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd" + "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd", + "LiMn" }; ssize_t ret; struct power_supply *psy = dev_get_drvdata(dev); @@ -84,6 +85,8 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(present), POWER_SUPPLY_ATTR(online), POWER_SUPPLY_ATTR(technology), + POWER_SUPPLY_ATTR(voltage_max), + POWER_SUPPLY_ATTR(voltage_min), POWER_SUPPLY_ATTR(voltage_max_design), POWER_SUPPLY_ATTR(voltage_min_design), POWER_SUPPLY_ATTR(voltage_now), @@ -103,7 +106,6 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(energy_now), POWER_SUPPLY_ATTR(energy_avg), POWER_SUPPLY_ATTR(capacity), - POWER_SUPPLY_ATTR(capacity_level), POWER_SUPPLY_ATTR(temp), POWER_SUPPLY_ATTR(temp_ambient), POWER_SUPPLY_ATTR(time_to_empty_now), @@ -113,6 +115,7 @@ static struct device_attribute power_supply_attrs[] = { /* Properties of type `const char *' */ POWER_SUPPLY_ATTR(model_name), POWER_SUPPLY_ATTR(manufacturer), + POWER_SUPPLY_ATTR(serial_number), }; static ssize_t power_supply_show_static_attrs(struct device *dev, @@ -198,7 +201,7 @@ int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env) dev_dbg(dev, "uevent\n"); - if (!psy) { + if (!psy || !psy->dev) { dev_dbg(dev, "No power supply yet\n"); return ret; }