Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee0f7c41 authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

power_supply: Add local extensions of string property names properly



For displaying local extensions of properties in string format,
add them between MODEL_NAME and SERIAL_NUMBER. Otherwise, those
properties would be represented as integer.

Change-Id: Iddb34d7ee6f520b789bc2e085ada4053343538f0
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent f695a5d7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -465,9 +465,9 @@ 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),
	POWER_SUPPLY_ATTR(battery_type),
	POWER_SUPPLY_ATTR(cycle_counts),
	POWER_SUPPLY_ATTR(serial_number),
};

static struct attribute *
+5 −1
Original line number Diff line number Diff line
@@ -338,9 +338,13 @@ enum power_supply_property {
	/* Properties of type `const char *' */
	POWER_SUPPLY_PROP_MODEL_NAME,
	POWER_SUPPLY_PROP_MANUFACTURER,
	POWER_SUPPLY_PROP_SERIAL_NUMBER,
	POWER_SUPPLY_PROP_BATTERY_TYPE,
	POWER_SUPPLY_PROP_CYCLE_COUNTS,
	/*
	 * Add local extensions for properties with string values between
	 * MODEL_NAME and SERIAL_NUMBER. Don't add below SERIAL_NUMBER.
	 */
	POWER_SUPPLY_PROP_SERIAL_NUMBER,
};

enum power_supply_type {