struct gb_power_supply_prop {
enum power_supply_property prop;
- u32 val;
- u32 previous_val;
+ int val;
+ int previous_val;
bool is_writeable;
};
struct gb_power_supply_prop *prop)
{
const struct gb_power_supply_changes *psyc;
- u32 val = prop->val;
- u32 prev_val = prop->previous_val;
+ int val = prop->val;
+ int prev_val = prop->previous_val;
int i;
for (i = 0; i < ARRAY_SIZE(psy_props_changes); i++) {
struct gb_power_supply_prop *prop;
struct gb_power_supply_get_property_request req;
struct gb_power_supply_get_property_response resp;
- u32 val;
+ int val;
int ret;
prop = get_psy_prop(gbpsy, psp);
req.psy_id = gbpsy->id;
req.property = (u8)psp;
req.prop_val = cpu_to_le32(val);
+ req.prop_val = cpu_to_le32((s32)val);
ret = gb_operation_sync(connection, GB_POWER_SUPPLY_TYPE_SET_PROPERTY,
&req, sizeof(req), NULL, 0);