diff options
Diffstat (limited to 'lib/sysfs_driver.c')
-rw-r--r-- | lib/sysfs_driver.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/sysfs_driver.c b/lib/sysfs_driver.c index 04b54a8..9b9bec0 100644 --- a/lib/sysfs_driver.c +++ b/lib/sysfs_driver.c @@ -79,7 +79,7 @@ static struct sysfs_driver *alloc_driver(void) * @path: path to driver directory * returns struct sysfs_driver with success and NULL with error */ -struct sysfs_driver *sysfs_open_driver_path(const unsigned char *path) +struct sysfs_driver *sysfs_open_driver_path(const char *path) { struct sysfs_driver *driver = NULL; @@ -168,7 +168,7 @@ struct dlist *sysfs_refresh_driver_attributes(struct sysfs_driver *driver) * returns sysfs_attribute reference on success or NULL with error */ struct sysfs_attribute *sysfs_get_driver_attr(struct sysfs_driver *drv, - const unsigned char *name) + const char *name) { struct dlist *attrlist = NULL; @@ -181,8 +181,7 @@ struct sysfs_attribute *sysfs_get_driver_attr(struct sysfs_driver *drv, if (attrlist == NULL) return NULL; - return sysfs_get_directory_attribute(drv->directory, - (unsigned char *)name); + return sysfs_get_directory_attribute(drv->directory, (char *)name); } /** @@ -292,7 +291,7 @@ struct dlist *sysfs_refresh_driver_devices(struct sysfs_driver *driver) * Returns a sysfs_device if found, NULL otherwise */ struct sysfs_device *sysfs_get_driver_device(struct sysfs_driver *driver, - const unsigned char *name) + const char *name) { struct sysfs_device *device = NULL; struct dlist *devlist = NULL; @@ -325,8 +324,8 @@ struct sysfs_device *sysfs_get_driver_device(struct sysfs_driver *driver, * @psize: size of "path" * Returns 0 on success and -1 on error */ -static int get_driver_path(const unsigned char *bus, - const unsigned char *drv, unsigned char *path, size_t psize) +static int get_driver_path(const char *bus, const char *drv, + char *path, size_t psize) { if (bus == NULL || drv == NULL || path == NULL) { errno = EINVAL; @@ -358,11 +357,11 @@ static int get_driver_path(const unsigned char *bus, * A call to sysfs_close_attribute() is required to close the * attribute returned and to free memory */ -struct sysfs_attribute *sysfs_open_driver_attr(const unsigned char *bus, - const unsigned char *drv, const unsigned char *attrib) +struct sysfs_attribute *sysfs_open_driver_attr(const char *bus, + const char *drv, const char *attrib) { struct sysfs_attribute *attribute = NULL; - unsigned char path[SYSFS_PATH_MAX]; + char path[SYSFS_PATH_MAX]; if (bus == NULL || drv == NULL || attrib == NULL) { errno = EINVAL; @@ -397,10 +396,10 @@ struct sysfs_attribute *sysfs_open_driver_attr(const unsigned char *bus, * @drv_name: Name of the driver * Returns the sysfs_driver reference on success and NULL on failure */ -struct sysfs_driver *sysfs_open_driver(const unsigned char *bus_name, - const unsigned char *drv_name) +struct sysfs_driver *sysfs_open_driver(const char *bus_name, + const char *drv_name) { - unsigned char path[SYSFS_PATH_MAX]; + char path[SYSFS_PATH_MAX]; struct sysfs_driver *driver = NULL; if (drv_name == NULL || bus_name == NULL) { |