From 6c62abc42bb1c2aad60d0da1ce3f7498ac48cd1b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 28 May 2015 12:09:41 +0200 Subject: lib/sysfs: rename devname functions, cleanup Well, I don't have mental power to use function names like sysfs_devname_to_dev_name() so this patch renames to sysfs_devname_sys_to_dev() sysfs_devname_dev_to_sys() It also cleanups usage of the functions. We have to be sure that sysfs.c code returns regular devnames. The existence of the sysfs devnames (with '!') should be completely hidden in sysfs specific code. Signed-off-by: Karel Zak --- include/sysfs.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'include/sysfs.h') diff --git a/include/sysfs.h b/include/sysfs.h index 6b08bbed5..55213780c 100644 --- a/include/sysfs.h +++ b/include/sysfs.h @@ -92,7 +92,7 @@ extern int sysfs_scsi_has_attribute(struct sysfs_cxt *cxt, const char *attr); extern int sysfs_scsi_path_contains(struct sysfs_cxt *cxt, const char *pattern); /** - * sysfs_devname_to_dev_name: + * sysfs_devname_sys_to_dev: * @name: devname to be converted in place * * Linux kernel linux/drivers/base/core.c: device_get_devnode() @@ -100,7 +100,7 @@ extern int sysfs_scsi_path_contains(struct sysfs_cxt *cxt, const char *pattern); * /dev device name. This helper replaces all ocurrences of '!' in * @name by '/' to convert from /sys to /dev. */ -static inline void sysfs_devname_to_dev_name (char *name) +static inline void sysfs_devname_sys_to_dev(char *name) { char *c; @@ -110,15 +110,12 @@ static inline void sysfs_devname_to_dev_name (char *name) } /** - * sysfs_dev_name_to_devname: + * sysfs_devname_dev_to_sys: * @name: devname to be converted in place * - * Linux kernel linux/drivers/base/core.c: device_get_devnode() - * defines a replacement of '!' in the /sys device name by '/' in the - * /dev device name. This helper replaces all ocurrences of '/' in - * @name by '!' to convert from /dev to /sys. + * See sysfs_devname_sys_to_dev(). */ -static inline void sysfs_dev_name_to_devname (char *name) +static inline void sysfs_devname_dev_to_sys(char *name) { char *c; -- cgit v1.2.3-55-g7522