소스 검색

dt/device: Fix auxdata matching to handle entries without a name override

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>
Grant Likely 13 년 전
부모
커밋
f88e1ae8ac
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/of/platform.c

+ 1 - 1
drivers/of/platform.c

@@ -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))