Forráskód Böngészése

greybus: core: Make greybus_match_one_id() return bool

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>
Viresh Kumar 9 éve
szülő
commit
129a6fbe76
1 módosított fájl, 5 hozzáadás és 5 törlés
  1. 5 5
      drivers/staging/greybus/core.c

+ 5 - 5
drivers/staging/greybus/core.c

@@ -31,22 +31,22 @@ int greybus_disabled(void)
 }
 }
 EXPORT_SYMBOL_GPL(greybus_disabled);
 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)
 				     const struct greybus_bundle_id *id)
 {
 {
 	if ((id->match_flags & GREYBUS_ID_MATCH_VENDOR) &&
 	if ((id->match_flags & GREYBUS_ID_MATCH_VENDOR) &&
 	    (id->vendor != bundle->intf->vendor_id))
 	    (id->vendor != bundle->intf->vendor_id))
-		return 0;
+		return false;
 
 
 	if ((id->match_flags & GREYBUS_ID_MATCH_PRODUCT) &&
 	if ((id->match_flags & GREYBUS_ID_MATCH_PRODUCT) &&
 	    (id->product != bundle->intf->product_id))
 	    (id->product != bundle->intf->product_id))
-		return 0;
+		return false;
 
 
 	if ((id->match_flags & GREYBUS_ID_MATCH_CLASS) &&
 	if ((id->match_flags & GREYBUS_ID_MATCH_CLASS) &&
 	    (id->class != bundle->class))
 	    (id->class != bundle->class))
-		return 0;
+		return false;
 
 
-	return 1;
+	return true;
 }
 }
 
 
 static const struct greybus_bundle_id *
 static const struct greybus_bundle_id *