]> git.karo-electronics.de Git - linux-beck.git/commitdiff
greybus: core: Make greybus_match_one_id() return bool
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 9 Jun 2016 11:04:36 +0000 (16:34 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 10 Jun 2016 00:28:02 +0000 (17:28 -0700)
This routine always returns 0 or 1 and a return type of 'bool' suits it
the best. Update it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/core.c

index 75bc6081d21ac2e11e17f9f2267bfb23c31ccd73..a3837b2c8e896ca3323c26a495f770e89444b7c9 100644 (file)
@@ -31,22 +31,22 @@ int greybus_disabled(void)
 }
 EXPORT_SYMBOL_GPL(greybus_disabled);
 
-static int greybus_match_one_id(struct gb_bundle *bundle,
+static bool greybus_match_one_id(struct gb_bundle *bundle,
                                     const struct greybus_bundle_id *id)
 {
        if ((id->match_flags & GREYBUS_ID_MATCH_VENDOR) &&
            (id->vendor != bundle->intf->vendor_id))
-               return 0;
+               return false;
 
        if ((id->match_flags & GREYBUS_ID_MATCH_PRODUCT) &&
            (id->product != bundle->intf->product_id))
-               return 0;
+               return false;
 
        if ((id->match_flags & GREYBUS_ID_MATCH_CLASS) &&
            (id->class != bundle->class))
-               return 0;
+               return false;
 
-       return 1;
+       return true;
 }
 
 static const struct greybus_bundle_id *