chiark / gitweb /
[PATCH] add support for i2c-adapter devices to wait_for_sysfs.c
[elogind.git] / wait_for_sysfs.c
index 6275db23b1ee3bb14c96702231b2deb86fbe638e..5e8874cf7c800926ed5db019a03d8768266083cb 100644 (file)
@@ -61,6 +61,8 @@ static int wait_for_class_device_attributes(struct sysfs_class_device *class_dev
                { .subsystem = "scsi_device",   .file = NULL },
                { .subsystem = "pcmcia_socket", .file = "card_type" },
                { .subsystem = "usb_host",      .file = NULL },
+               { .subsystem = "bluetooth",     .file = "address" },
+               { .subsystem = "i2c-adapter",   .file = NULL },
                { NULL, NULL }
        };
        struct class_file *classfile;
@@ -150,6 +152,7 @@ static int class_device_expect_no_bus(struct sysfs_class_device *class_dev)
 {
        static char *devices_without_bus[] = {
                "scsi_host",
+               "i2c-adapter",
                NULL
        };
        char **device;
@@ -174,6 +177,7 @@ static int wait_for_bus_device(struct sysfs_device *device_dev)
                { .bus = "scsi",        .file = "vendor" },
                { .bus = "usb",         .file = "idVendor" },
                { .bus = "usb",         .file = "iInterface" },
+               { .bus = "usb",         .file = "bNumEndpoints" },
                { .bus = "usb-serial",  .file = "detach_state" },
                { .bus = "ide",         .file = "detach_state" },
                { .bus = "pci",         .file = "vendor" },