]> err.no Git - linux-2.6/commitdiff
PMU battery: filenames in sysfs with spaces
authorChristian Kujau <lists@nerdbynature.de>
Fri, 2 May 2008 20:41:56 +0000 (13:41 -0700)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Fri, 2 May 2008 23:40:42 +0000 (03:40 +0400)
By changing drivers/power/pmu_battery.c I now have '_' instead of
' ' (spaces) in /sys:

/sys/devices/platform/pmu-battery.0/power_supply/PMU_battery_0
/sys/class/power_supply/PMU_battery_0

I'm still not sure if some userspace tool out there uses the old paths and
will break now.

Signed-off-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
drivers/power/pmu_battery.c

index 60a8cf3a0431f870c2b9a87d8466d77fc17ffc4a..9346a862f1f2609bd5bdf834357c65d0bf24803e 100644 (file)
@@ -159,7 +159,7 @@ static int __init pmu_bat_init(void)
                if (!pbat)
                        break;
 
-               sprintf(pbat->name, "PMU battery %d", i);
+               sprintf(pbat->name, "PMU_battery_%d", i);
                pbat->bat.name = pbat->name;
                pbat->bat.properties = pmu_bat_props;
                pbat->bat.num_properties = ARRAY_SIZE(pmu_bat_props);