- struct udev_device *parent;
- char *path = NULL;
-
- /* S390 ccw bus */
- parent = udev_device_get_parent_with_subsystem_devtype(dev, "ccw", NULL);
- if (parent != NULL) {
- handle_ccw(parent, dev, &path);
- goto out;
- }
-
- /* walk up the chain of devices and compose path */
- parent = dev;
- while (parent != NULL) {
- const char *subsys;
-
- subsys = udev_device_get_subsystem(parent);
- if (subsys == NULL) {
- ;
- } else if (strcmp(subsys, "scsi_tape") == 0) {
- handle_scsi_tape(parent, &path);
- } else if (strcmp(subsys, "scsi") == 0) {
- parent = handle_scsi(parent, &path);
- } else if (strcmp(subsys, "cciss") == 0) {
- handle_cciss(parent, &path);
- } else if (strcmp(subsys, "usb") == 0) {
- parent = handle_usb(parent, &path);
- } else if (strcmp(subsys, "serio") == 0) {
- path_prepend(&path, "serio-%s", udev_device_get_sysnum(parent));
- parent = skip_subsystem(parent, "serio");
- } else if (strcmp(subsys, "pci") == 0) {
- path_prepend(&path, "pci-%s", udev_device_get_sysname(parent));
- parent = skip_subsystem(parent, "pci");
- } else if (strcmp(subsys, "platform") == 0) {
- path_prepend(&path, "platform-%s", udev_device_get_sysname(parent));
- parent = skip_subsystem(parent, "platform");
- } else if (strcmp(subsys, "acpi") == 0) {
- path_prepend(&path, "acpi-%s", udev_device_get_sysname(parent));
- parent = skip_subsystem(parent, "acpi");
- } else if (strcmp(subsys, "xen") == 0) {
- path_prepend(&path, "xen-%s", udev_device_get_sysname(parent));
- parent = skip_subsystem(parent, "xen");
- } else if (strcmp(subsys, "virtio") == 0) {
- path_prepend(&path, "virtio-pci-%s", udev_device_get_sysname(parent));
- parent = skip_subsystem(parent, "virtio");
- }
-
- parent = udev_device_get_parent(parent);
- }
+ struct udev_device *parent;
+ char *path = NULL;
+
+ /* S390 ccw bus */
+ parent = udev_device_get_parent_with_subsystem_devtype(dev, "ccw", NULL);
+ if (parent != NULL) {
+ handle_ccw(parent, dev, &path);
+ goto out;
+ }
+
+ /* walk up the chain of devices and compose path */
+ parent = dev;
+ while (parent != NULL) {
+ const char *subsys;
+
+ subsys = udev_device_get_subsystem(parent);
+ if (subsys == NULL) {
+ ;
+ } else if (strcmp(subsys, "scsi_tape") == 0) {
+ handle_scsi_tape(parent, &path);
+ } else if (strcmp(subsys, "scsi") == 0) {
+ parent = handle_scsi(parent, &path);
+ } else if (strcmp(subsys, "cciss") == 0) {
+ handle_cciss(parent, &path);
+ } else if (strcmp(subsys, "usb") == 0) {
+ parent = handle_usb(parent, &path);
+ } else if (strcmp(subsys, "serio") == 0) {
+ path_prepend(&path, "serio-%s", udev_device_get_sysnum(parent));
+ parent = skip_subsystem(parent, "serio");
+ } else if (strcmp(subsys, "pci") == 0) {
+ path_prepend(&path, "pci-%s", udev_device_get_sysname(parent));
+ parent = skip_subsystem(parent, "pci");
+ } else if (strcmp(subsys, "platform") == 0) {
+ path_prepend(&path, "platform-%s", udev_device_get_sysname(parent));
+ parent = skip_subsystem(parent, "platform");
+ } else if (strcmp(subsys, "acpi") == 0) {
+ path_prepend(&path, "acpi-%s", udev_device_get_sysname(parent));
+ parent = skip_subsystem(parent, "acpi");
+ } else if (strcmp(subsys, "xen") == 0) {
+ path_prepend(&path, "xen-%s", udev_device_get_sysname(parent));
+ parent = skip_subsystem(parent, "xen");
+ } else if (strcmp(subsys, "virtio") == 0) {
+ path_prepend(&path, "virtio-pci-%s", udev_device_get_sysname(parent));
+ parent = skip_subsystem(parent, "virtio");
+ }
+
+ parent = udev_device_get_parent(parent);
+ }