Merge branch 'bkl/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic...
[safe/jmp/linux-2.6] / drivers / scsi / raid_class.c
index 913a931..2c146b4 100644 (file)
@@ -63,6 +63,7 @@ static int raid_match(struct attribute_container *cont, struct device *dev)
         * emulated RAID devices, so start with SCSI */
        struct raid_internal *i = ac_to_raid_internal(cont);
 
+#if defined(CONFIG_SCSI) || defined(CONFIG_SCSI_MODULE)
        if (scsi_is_sdev_device(dev)) {
                struct scsi_device *sdev = to_scsi_device(dev);
 
@@ -71,6 +72,7 @@ static int raid_match(struct attribute_container *cont, struct device *dev)
 
                return i->f->is_raid(dev);
        }
+#endif
        /* FIXME: look at other subsystems too */
        return 0;
 }
@@ -149,6 +151,7 @@ static struct {
        { RAID_LEVEL_0, "raid0" },
        { RAID_LEVEL_1, "raid1" },
        { RAID_LEVEL_10, "raid10" },
+       { RAID_LEVEL_1E, "raid1e" },
        { RAID_LEVEL_3, "raid3" },
        { RAID_LEVEL_4, "raid4" },
        { RAID_LEVEL_5, "raid5" },
@@ -237,8 +240,7 @@ int raid_component_add(struct raid_template *r,struct device *raid_dev,
        rc->dev.parent = get_device(component_dev);
        rc->num = rd->component_count++;
 
-       snprintf(rc->dev.bus_id, sizeof(rc->dev.bus_id),
-                "component-%d", rc->num);
+       dev_set_name(&rc->dev, "component-%d", rc->num);
        list_add_tail(&rc->node, &rd->component_list);
        rc->dev.class = &raid_class.class;
        err = device_add(&rc->dev);