#include <linux/power_supply.h>
#include <linux/slab.h>
#include <linux/stat.h>
+#include <linux/string_helpers.h>
#include "power_supply.h"
NULL,
};
-static void str_to_lower(char *str)
-{
- while (*str) {
- *str = tolower(*str);
- str++;
- }
-}
-
void power_supply_init_attrs(struct device_type *dev_type)
{
int i;
__func__, i);
sprintf(power_supply_attrs[i].attr_name, "_err_%d", i);
} else {
- str_to_lower(power_supply_attrs[i].attr_name);
+ string_lower(power_supply_attrs[i].attr_name,
+ power_supply_attrs[i].attr_name);
}
attr = &power_supply_attrs[i].dev_attr;