]> git.karo-electronics.de Git - linux-beck.git/commitdiff
greybus: power_supply: fix update interval check at request handler
authorRui Miguel Silva <rui.silva@linaro.org>
Tue, 16 Aug 2016 21:31:56 +0000 (22:31 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 18 Aug 2016 15:34:01 +0000 (17:34 +0200)
We use the update interval to control the remove path and we set it to
zero when we do not want to have more updates in transit. That means
that the check in the request handler needs to be for interval update
zero to discard the newly received request and not the other way around
like it is.

This will fix the issue that all incoming requests were being discard.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/power_supply.c

index aeb6a07e43a6924c3110e031c7fb68f6e47c7982..3d6f81017d984f34d73ea06e02374196d833bdaf 100644 (file)
@@ -982,7 +982,7 @@ static int gb_supplies_request_handler(struct gb_operation *op)
         * running. For that just check update_interval.
         */
        gbpsy = &supplies->supply[psy_id];
-       if (gbpsy->update_interval) {
+       if (!gbpsy->update_interval) {
                ret = -ESHUTDOWN;
                goto out_unlock;
        }