]> err.no Git - linux-2.6/blobdiff - drivers/scsi/scsi_sysfs.c
Merge branches 'pxa-ezx', 'pxa-magician' and 'pxa-palm' into pxa
[linux-2.6] / drivers / scsi / scsi_sysfs.c
index 198aa4571e358f75bebec9e8a2267828392ad3b4..93d2b6714453e6ae7e11f1cd2e3b864182f7d66d 100644 (file)
@@ -359,7 +359,12 @@ static int scsi_bus_match(struct device *dev, struct device_driver *gendrv)
 
 static int scsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
 {
-       struct scsi_device *sdev = to_scsi_device(dev);
+       struct scsi_device *sdev;
+
+       if (dev->type != &scsi_dev_type)
+               return 0;
+
+       sdev = to_scsi_device(dev);
 
        add_uevent_var(env, "MODALIAS=" SCSI_DEVICE_MODALIAS_FMT, sdev->type);
        return 0;
@@ -889,7 +894,7 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
                goto out;
        }
 
-       error = bsg_register_queue(rq, &sdev->sdev_gendev, NULL);
+       error = bsg_register_queue(rq, &sdev->sdev_gendev, NULL, NULL);
 
        if (error)
                sdev_printk(KERN_INFO, sdev,