Yah yah, really trivial stuff...
- get_class_device() doesn't need to be exported; it
should be static
- white space cleanup
return retval;
}
-struct sysfs_class_device *get_class_dev(char *device_name)
+static struct sysfs_class_device *get_class_dev(char *device_name)
{
char sysfs_path[SYSFS_PATH_MAX];
char dev_path[SYSFS_PATH_MAX];
data = tdb_fetch(udevdb, key);
if (data.dptr == NULL || data.dsize == 0)
return NULL;
-
+
rec = (struct busdb_record *)malloc(sizeof(struct busdb_record));
if (rec == NULL) {
free(data.dptr);
return NULL;
}
-
+
memcpy(rec, data.dptr, sizeof(struct busdb_record));
free(data.dptr);