chiark / gitweb /
[PATCH] fix namedev.c to build with older version of gcc.
authorgreg@kroah.com <greg@kroah.com>
Wed, 19 Nov 2003 14:38:18 +0000 (06:38 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:06:25 +0000 (21:06 -0700)
namedev.c

index 223fd6d..9a556cb 100644 (file)
--- a/namedev.c
+++ b/namedev.c
@@ -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))