Subject: Re: ofpart: Partitions at same address cannot have the same name

From: Scott Wood <[email-masked]>
Date: Wed, 22 Apr 2009 12:27:45 -0500

Benjamin Krill wrote:
>> --- a/drivers/mtd/ofpart.c
>> +++ b/drivers/mtd/ofpart.c
>> @@ -48,7 +48,7 @@ int __devinit of_mtd_parse_partitions(struct device *dev,
>>
>> 		/* check if this is a partition node */
>> 		partname = of_get_property(pp, "name", &len);
>> -		if (strcmp(partname, "partition") != 0) {
>> +		if (strncmp(partname, "partition", strlen("partition") != 0) {

Perhaps "compatible" should be used instead?

> Hi Recardo,
> 
> I would suggest to do:
> 
> 		if (strcmp(partname, "partition") <= 0) {

Check whether it sorts alphabetically before "partition"?  Why?

-Scott