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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rob Herring <robh+dt@xxxxxxxxxx> writes:
> On Mon, Jul 30, 2018 at 7:15 AM Michael Ellerman <mpe@xxxxxxxxxxxxxx> wrote:
...
>> 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux