summaryrefslogtreecommitdiff
path: root/udev-add.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev-add.c')
-rw-r--r--udev-add.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/udev-add.c b/udev-add.c
index e64a845c7e..33ee633fd8 100644
--- a/udev-add.c
+++ b/udev-add.c
@@ -54,14 +54,14 @@
static int get_major_minor(struct sysfs_class_device *class_dev, struct udevice *udev)
{
int retval = -ENODEV;
- char *dev;
+ struct sysfs_attribute *attr = NULL;
- dev = sysfs_get_value_from_attributes(class_dev->directory->attributes, "dev");
- if (dev == NULL)
+ attr = sysfs_get_classdev_attr(class_dev, "dev");
+ if (attr == NULL)
goto exit;
- dbg("dev='%s'", dev);
+ dbg("dev='%s'", attr->value);
- if (sscanf(dev, "%u:%u", &udev->major, &udev->minor) != 2)
+ if (sscanf(attr->value, "%u:%u", &udev->major, &udev->minor) != 2)
goto exit;
dbg("found major=%d, minor=%d", udev->major, udev->minor);