chiark / gitweb /
[PATCH] remove unused variables
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Sun, 28 Nov 2004 13:01:43 +0000 (14:01 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:00:29 +0000 (23:00 -0700)
Remove udev.bus, cause it's currently unused and newer kernels will pass
it in the hotplug environment as PHYSDEVBUS.

Remove udev.action, cause it's unused.

Rename udev_set_values() to udev_init_device().

namedev.c
udev.c
udev.h
udev_start.c
udev_utils.c
udev_utils.h
udevtest.c

index 8976b8d40ae951abdc592937fc3134242a042f6c..c043cf339e1695a85ea641c9440fb3315dc4b8b0 100644 (file)
--- a/namedev.c
+++ b/namedev.c
@@ -708,7 +708,6 @@ try_parent:
                        return -ENODEV;
                dbg("sysfs_device->path='%s'", sysfs_device->path);
                dbg("sysfs_device->bus_id='%s'", sysfs_device->bus_id);
                        return -ENODEV;
                dbg("sysfs_device->path='%s'", sysfs_device->path);
                dbg("sysfs_device->bus_id='%s'", sysfs_device->bus_id);
-               dbg("sysfs_device->bus='%s'", sysfs_device->bus);
        }
 
 }
        }
 
 }
@@ -742,7 +741,6 @@ int namedev_name_device(struct udevice *udev, struct sysfs_class_device *class_d
                dbg("found devices device: path='%s', bus_id='%s', bus='%s'",
                    sysfs_device->path, sysfs_device->bus_id, sysfs_device->bus);
                strfieldcpy(udev->bus_id, sysfs_device->bus_id);
                dbg("found devices device: path='%s', bus_id='%s', bus='%s'",
                    sysfs_device->path, sysfs_device->bus_id, sysfs_device->bus);
                strfieldcpy(udev->bus_id, sysfs_device->bus_id);
-               strfieldcpy(udev->bus, sysfs_device->bus);
        }
 
        strfieldcpy(udev->kernel_name, class_dev->name);
        }
 
        strfieldcpy(udev->kernel_name, class_dev->name);
diff --git a/udev.c b/udev.c
index 958fa4eb0a3292e981ba4f3b1b9cd735750947ee..847cc5dade49bdf177082e5f8a4ae88110e70c9d 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -119,7 +119,7 @@ int main(int argc, char *argv[], char *envp[])
        /* trigger timeout to interrupt blocking syscalls */
        alarm(ALARM_TIMEOUT);
 
        /* trigger timeout to interrupt blocking syscalls */
        alarm(ALARM_TIMEOUT);
 
-       udev_set_values(&udev, devpath, subsystem, action);
+       udev_init_device(&udev, devpath, subsystem);
 
        if (strstr(argv[0], "udevstart") || (argv[1] != NULL && strstr(argv[1], "udevstart"))) {
                dbg("udevstart");
 
        if (strstr(argv[0], "udevstart") || (argv[1] != NULL && strstr(argv[1], "udevstart"))) {
                dbg("udevstart");
diff --git a/udev.h b/udev.h
index ace843f0ad2f33166fe565da84129ff3a0d077e1..2c5270a4c34bd28cee6c8c064d69dc0e9d2e1901 100644 (file)
--- a/udev.h
+++ b/udev.h
@@ -50,7 +50,6 @@
 struct udevice {
        char devpath[DEVPATH_SIZE];
        char subsystem[SUBSYSTEM_SIZE];
 struct udevice {
        char devpath[DEVPATH_SIZE];
        char subsystem[SUBSYSTEM_SIZE];
-       char action[ACTION_SIZE];
        char name[NAME_SIZE];
        char owner[OWNER_SIZE];
        char group[GROUP_SIZE];
        char name[NAME_SIZE];
        char owner[OWNER_SIZE];
        char group[GROUP_SIZE];
@@ -65,7 +64,6 @@ struct udevice {
        char config_file[NAME_SIZE];
        long config_uptime;
        char bus_id[SYSFS_NAME_LEN];
        char config_file[NAME_SIZE];
        long config_uptime;
        char bus_id[SYSFS_NAME_LEN];
-       char bus[SYSFS_NAME_LEN];
        char program_result[NAME_SIZE];
        char kernel_number[NAME_SIZE];
        char kernel_name[NAME_SIZE];
        char program_result[NAME_SIZE];
        char kernel_number[NAME_SIZE];
        char kernel_name[NAME_SIZE];
index 1a86163cd557e980f1bbadab575aab043381744e..8c7a06b5afd8f6d9aa08c309b6871a7e0a7b1de6 100644 (file)
@@ -105,7 +105,7 @@ static int add_device(char *devpath, char *subsystem)
                return -ENODEV;
        }
 
                return -ENODEV;
        }
 
-       udev_set_values(&udev, devpath, subsystem, "add");
+       udev_init_device(&udev, devpath, subsystem);
        udev_add_device(&udev, class_dev);
 
        /* run dev.d/ scripts if we created a node or changed a netif name */
        udev_add_device(&udev, class_dev);
 
        /* run dev.d/ scripts if we created a node or changed a netif name */
index bdf0233e3ae1c5828f6cedc4acfea3463a227a58..aa5c75f74d02a29c466a0185a8bbb9126cd1ed42 100644 (file)
@@ -36,8 +36,7 @@
 #include "list.h"
 
 
 #include "list.h"
 
 
-void udev_set_values(struct udevice *udev, const char* devpath,
-                    const char *subsystem, const char* action)
+void udev_init_device(struct udevice *udev, const char* devpath, const char *subsystem)
 {
        memset(udev, 0x00, sizeof(struct udevice));
 
 {
        memset(udev, 0x00, sizeof(struct udevice));
 
@@ -45,8 +44,6 @@ void udev_set_values(struct udevice *udev, const char* devpath,
                strfieldcpy(udev->devpath, devpath);
        if (subsystem)
                strfieldcpy(udev->subsystem, subsystem);
                strfieldcpy(udev->devpath, devpath);
        if (subsystem)
                strfieldcpy(udev->subsystem, subsystem);
-       if (action)
-               strfieldcpy(udev->action, action);
 
        if (strcmp(udev->subsystem, "block") == 0)
                udev->type = 'b';
 
        if (strcmp(udev->subsystem, "block") == 0)
                udev->type = 'b';
index b9b0fda6780302f19d2b780e840c20776887694b..e36255f526f1e72b89d69eaf1c5dbcfd3e2ddc02 100644 (file)
@@ -76,8 +76,7 @@ do { \
 # define asmlinkage    /* nothing */
 #endif
 
 # define asmlinkage    /* nothing */
 #endif
 
-extern void udev_set_values(struct udevice *udev, const char* devpath,
-                           const char *subsystem, const char* action);
+extern void udev_init_device(struct udevice *udev, const char* devpath, const char *subsystem);
 extern int kernel_release_satisfactory(int version, int patchlevel, int sublevel);
 extern int create_path(const char *path);
 extern int file_map(const char *filename, char **buf, size_t *bufsize);
 extern int kernel_release_satisfactory(int version, int patchlevel, int sublevel);
 extern int create_path(const char *path);
 extern int file_map(const char *filename, char **buf, size_t *bufsize);
index 9cc23f0ac70be903fb54edd9e4215d004c3e8870..38e2bb7562348c54168050a5d8de932d13228bf8 100644 (file)
@@ -97,7 +97,7 @@ int main(int argc, char *argv[], char *envp[])
                subsystem = argv[2];
 
        /* fill in values and test_run flag*/
                subsystem = argv[2];
 
        /* fill in values and test_run flag*/
-       udev_set_values(&udev, devpath, subsystem, "add");
+       udev_init_device(&udev, devpath, subsystem);
 
        /* open the device */
        snprintf(path, SYSFS_PATH_MAX, "%s%s", sysfs_path, udev.devpath);
 
        /* open the device */
        snprintf(path, SYSFS_PATH_MAX, "%s%s", sysfs_path, udev.devpath);