diff options
-rw-r--r-- | drivers/power/generic-adc-battery.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c index 4a00ef7a8795..ecbf672a35db 100644 --- a/drivers/power/generic-adc-battery.c +++ b/drivers/power/generic-adc-battery.c | |||
@@ -279,7 +279,8 @@ static int __devinit gab_probe(struct platform_device *pdev) | |||
279 | } | 279 | } |
280 | 280 | ||
281 | memcpy(psy->properties, gab_props, sizeof(gab_props)); | 281 | memcpy(psy->properties, gab_props, sizeof(gab_props)); |
282 | properties = psy->properties + sizeof(gab_props); | 282 | properties = (enum power_supply_property *) |
283 | ((char *)psy->properties + sizeof(gab_props)); | ||
283 | 284 | ||
284 | /* | 285 | /* |
285 | * getting channel from iio and copying the battery properties | 286 | * getting channel from iio and copying the battery properties |