Thread (5 messages) flat view 5 messages, 2 authors, 2018-08-03

Re: [PATCH 1/2] of: Add of_machine_compatible_match()

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2018-08-03 10:31:03
Also in: linuxppc-dev

Rob Herring [off-list ref] writes:
On Mon, Jul 30, 2018 at 7:15 AM Michael Ellerman [off-list ref] wrote:
...
quoted
diff --git a/include/linux/of.h b/include/linux/of.h
index 4d25e4f952d9..05e3e23a3a57 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -389,6 +389,7 @@ extern int of_alias_get_id(struct device_node *np, const char *stem);
 extern int of_alias_get_highest_id(const char *stem);

 extern int of_machine_is_compatible(const char *compat);
+extern bool of_machine_compatible_match(const char *const *compats);
Would be nice if of_machine_is_compatible could be implemented in
terms of of_machine_compatible_match like this:

int of_machine_is_compatible(const char *compat)
{
  const char *compats[] = { compat, NULL };
  return of_machine_is_compatible(compats);
}

Probably can be inline too.
Yeah good idea, I'll do a v2 next week.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help