]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/power/generic-adc-battery.c
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
[karo-tx-linux.git] / drivers / power / generic-adc-battery.c
index e902b088d52cf334429b287ad1b26640ffbd051a..32ce17e235c08ef3644c81573a22ad37417e50b2 100644 (file)
@@ -279,7 +279,8 @@ static int gab_probe(struct platform_device *pdev)
        }
 
        memcpy(psy->properties, gab_props, sizeof(gab_props));
-       properties = psy->properties + sizeof(gab_props);
+       properties = (enum power_supply_property *)
+                               ((char *)psy->properties + sizeof(gab_props));
 
        /*
         * getting channel from iio and copying the battery properties
@@ -327,7 +328,7 @@ static int gab_probe(struct platform_device *pdev)
                ret = request_any_context_irq(irq, gab_charged,
                                IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
                                "battery charged", adc_bat);
-               if (ret)
+               if (ret < 0)
                        goto err_gpio;
        }