From a9ae3e34951d8f719190ce50c991b3ec815c7d0d Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Tue, 30 Jul 2002 05:43:45 -0700 Subject: device symlinks: just pass name, not struct driver_file_entry to driverfs_create_symlink symlinks now only use the name field of the struct driver_file_entry, so instead of allocating a new one each time we want to create one, this changes the API to only accept the name (since the driverfs core will never use the other fields either) This also guarantees that we won't leak the memory for the entry when the device goes away: Since the other entries aren't dynamically allocated, and driverfs doesn't free them, we would have to free them ourselves. It's not really necessary, so this is another win for us. --- include/linux/driverfs_fs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/driverfs_fs.h b/include/linux/driverfs_fs.h index 64783095cc9a..758dc23f09f6 100644 --- a/include/linux/driverfs_fs.h +++ b/include/linux/driverfs_fs.h @@ -54,8 +54,7 @@ driverfs_create_file(struct driver_file_entry * entry, extern int driverfs_create_symlink(struct driver_dir_entry * parent, - struct driver_file_entry * entry, - char * target); + char * name, char * target); extern void driverfs_remove_file(struct driver_dir_entry *, const char * name); -- cgit v1.2.3