chiark / gitweb /
libudev: device - remove udev_device_get_parent_with_subsystem
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 3 Jan 2009 10:13:51 +0000 (11:13 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Sat, 3 Jan 2009 14:12:28 +0000 (15:12 +0100)
extras/usb_id/usb_id.c
udev/lib/exported_symbols
udev/lib/libudev-device.c
udev/lib/libudev.h

index 28352eb08a239d9c36e812b893b10ce2c9c12626..9ee4e6ece34a248025f29e67e3225147d4bb7891 100644 (file)
@@ -192,7 +192,7 @@ static int usb_id(struct udev_device *dev)
        dbg(udev, "syspath %s\n", udev_device_get_syspath(dev));
 
        /* usb interface directory */
        dbg(udev, "syspath %s\n", udev_device_get_syspath(dev));
 
        /* usb interface directory */
-       dev_interface = udev_device_get_parent_with_subsystem(dev, "usb");
+       dev_interface = udev_device_get_parent_with_subsystem_devtype(dev, "usb", NULL);
        if (dev_interface == NULL) {
                info(udev, "unable to access usb_interface device of '%s'\n",
                     udev_device_get_syspath(dev));
        if (dev_interface == NULL) {
                info(udev, "unable to access usb_interface device of '%s'\n",
                     udev_device_get_syspath(dev));
@@ -218,7 +218,7 @@ static int usb_id(struct udev_device *dev)
             udev_device_get_syspath(dev_interface), if_class_num, protocol);
 
        /* usb device directory */
             udev_device_get_syspath(dev_interface), if_class_num, protocol);
 
        /* usb device directory */
-       dev_usb = udev_device_get_parent_with_subsystem(dev_interface, "usb");
+       dev_usb = udev_device_get_parent_with_subsystem_devtype(dev_interface, "usb", NULL);
        if (!dev_usb) {
                info(udev, "unable to find parent 'usb' device of '%s'\n",
                     udev_device_get_syspath(dev));
        if (!dev_usb) {
                info(udev, "unable to find parent 'usb' device of '%s'\n",
                     udev_device_get_syspath(dev));
@@ -232,7 +232,7 @@ static int usb_id(struct udev_device *dev)
                int host, bus, target, lun;
 
                /* get scsi device */
                int host, bus, target, lun;
 
                /* get scsi device */
-               dev_scsi = udev_device_get_parent_with_subsystem(dev, "scsi");
+               dev_scsi = udev_device_get_parent_with_subsystem_devtype(dev, "scsi", NULL);
                if (dev_scsi == NULL) {
                        info(udev, "unable to find parent 'scsi' device of '%s'\n",
                             udev_device_get_syspath(dev));
                if (dev_scsi == NULL) {
                        info(udev, "unable to find parent 'scsi' device of '%s'\n",
                             udev_device_get_syspath(dev));
index 88d5c48c10c646bb128ec836fcb995aecd0887bb..abf50517919ec0f4c141dfff861b9f0cbd2eda32 100644 (file)
@@ -16,7 +16,6 @@ udev_device_new_from_syspath
 udev_device_new_from_devnum
 udev_device_new_from_subsystem_sysname
 udev_device_get_parent
 udev_device_new_from_devnum
 udev_device_new_from_subsystem_sysname
 udev_device_get_parent
-udev_device_get_parent_with_subsystem
 udev_device_get_parent_with_subsystem_devtype
 udev_device_ref
 udev_device_unref
 udev_device_get_parent_with_subsystem_devtype
 udev_device_ref
 udev_device_unref
index 7c803594e4b2000760f71b5be3a7690ae71b3651..0cb59212815459924f7319187ff7e5b0d81e9f21 100644 (file)
@@ -541,22 +541,6 @@ struct udev_device *udev_device_get_parent(struct udev_device *udev_device)
        return udev_device->parent_device;
 }
 
        return udev_device->parent_device;
 }
 
-struct udev_device *udev_device_get_parent_with_subsystem(struct udev_device *udev_device, const char *subsystem)
-{
-       struct udev_device *parent;
-
-       parent = udev_device_get_parent(udev_device);
-       while (parent != NULL) {
-               const char *parent_subsystem;
-
-               parent_subsystem = udev_device_get_subsystem(parent);
-               if (parent_subsystem != NULL && strcmp(parent_subsystem, subsystem) == 0)
-                       break;
-               parent = udev_device_get_parent(parent);
-       }
-       return parent;
-}
-
 struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype)
 {
        struct udev_device *parent;
 struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype)
 {
        struct udev_device *parent;
index bac362a360ac15c9af7ebb08bf1ee8663adef013..63b9b79d3fc86086726362c5c80ea3f2ea3161c2 100644 (file)
@@ -62,7 +62,6 @@ extern struct udev_device *udev_device_new_from_syspath(struct udev *udev, const
 extern struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum);
 extern struct udev_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname);
 extern struct udev_device *udev_device_get_parent(struct udev_device *udev_device);
 extern struct udev_device *udev_device_new_from_devnum(struct udev *udev, char type, dev_t devnum);
 extern struct udev_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname);
 extern struct udev_device *udev_device_get_parent(struct udev_device *udev_device);
-extern struct udev_device *udev_device_get_parent_with_subsystem(struct udev_device *udev_device, const char *subsystem);
 extern struct udev_device *udev_device_get_parent_with_subsytem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype);
 extern struct udev_device *udev_device_ref(struct udev_device *udev_device);
 extern void udev_device_unref(struct udev_device *udev_device);
 extern struct udev_device *udev_device_get_parent_with_subsytem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype);
 extern struct udev_device *udev_device_ref(struct udev_device *udev_device);
 extern void udev_device_unref(struct udev_device *udev_device);