dt/device: Fix auxdata matching to handle entries without a name override
authorGrant Likely <grant.likely@secretlab.ca>
Mon, 12 Dec 2011 16:26:00 +0000 (09:26 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Mon, 12 Dec 2011 21:41:45 +0000 (14:41 -0700)
There is no requirement to override name entries in auxdata.  Fix the
entry matching to use .compatible instead of .name to find the end of the
list.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/of/platform.c

index cbd5d701c7e086f632f74bf8bec29fe1a23e6a55..63b3ec48c203a43f3d8a9d395e459d765fd7f7b0 100644 (file)
@@ -314,7 +314,7 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l
        if (!lookup)
                return NULL;
 
-       for(; lookup->name != NULL; lookup++) {
+       for(; lookup->compatible != NULL; lookup++) {
                if (!of_device_is_compatible(np, lookup->compatible))
                        continue;
                if (of_address_to_resource(np, 0, &res))