diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-01 20:59:09 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-09-01 20:59:09 +0200 |
commit | 44aff4cd6d74d230e4a97f8d59f780472b7cad6e (patch) | |
tree | 893df31fbb0c2005226435a21aa7041e19d75e6e /udev/udev_device.c | |
parent | 0d1c29c3d143232dfedf0881524bb2ef803c3067 (diff) |
udev_device_init() remove statically allocated device support
Diffstat (limited to 'udev/udev_device.c')
-rw-r--r-- | udev/udev_device.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/udev/udev_device.c b/udev/udev_device.c index 98886763c4..130c714301 100644 --- a/udev/udev_device.c +++ b/udev/udev_device.c @@ -34,10 +34,11 @@ #include "udev_rules.h" -struct udevice *udev_device_init(struct udevice *udev) +struct udevice *udev_device_init(void) { - if (udev == NULL) - udev = malloc(sizeof(struct udevice)); + struct udevice *udev; + + udev = malloc(sizeof(struct udevice)); if (udev == NULL) return NULL; memset(udev, 0x00, sizeof(struct udevice)); @@ -55,12 +56,13 @@ struct udevice *udev_device_init(struct udevice *udev) strcpy(udev->group, "root"); udev->event_timeout = -1; - return udev; } void udev_device_cleanup(struct udevice *udev) { + if (udev == NULL) + return; name_list_cleanup(&udev->symlink_list); name_list_cleanup(&udev->run_list); name_list_cleanup(&udev->env_list); |