[PATCH] fix namedev.c to build with older version of gcc.

This commit is contained in:
greg@kroah.com 2003-11-19 06:38:18 -08:00 committed by Greg KH
parent 09e52d5126
commit a1b8786ae6

View File

@ -753,11 +753,12 @@ static void do_kernelname(struct sysfs_class_device *class_dev, struct udevice *
{
struct config_device *dev;
struct list_head *tmp;
int len;
strfieldcpy(udev->name, class_dev->name);
list_for_each(tmp, &config_device_list) {
dev = list_entry(tmp, struct config_device, node);
int len = strlen(dev->name);
len = strlen(dev->name);
if (dev->name[len-1] == '*') {
len--;
if (strncmp(dev->name, class_dev->name, len))