]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/scsi_proc.c
nilfs2: remove compat ioctl code
[linux-2.6-omap-h63xx.git] / drivers / scsi / scsi_proc.c
index c6a904a45bf9871677e50ea762ceaf3c468ae049..77fbddb507fdcb65b5d4fc940e6780ae756f6da9 100644 (file)
@@ -115,8 +115,6 @@ void scsi_proc_hostdir_add(struct scsi_host_template *sht)
                if (!sht->proc_dir)
                        printk(KERN_ERR "%s: proc_mkdir failed for %s\n",
                               __func__, sht->proc_name);
-               else
-                       sht->proc_dir->owner = sht->module;
        }
        mutex_unlock(&global_host_template_mutex);
 }
@@ -163,7 +161,6 @@ void scsi_proc_host_add(struct Scsi_Host *shost)
        } 
 
        p->write_proc = proc_scsi_write_proc;
-       p->owner = sht->module;
 }
 
 /**
@@ -259,8 +256,8 @@ static int scsi_add_single_device(uint host, uint channel, uint id, uint lun)
        int error = -ENXIO;
 
        shost = scsi_host_lookup(host);
-       if (IS_ERR(shost))
-               return PTR_ERR(shost);
+       if (!shost)
+               return error;
 
        if (shost->transportt->user_scan)
                error = shost->transportt->user_scan(shost, channel, id, lun);
@@ -287,8 +284,8 @@ static int scsi_remove_single_device(uint host, uint channel, uint id, uint lun)
        int error = -ENXIO;
 
        shost = scsi_host_lookup(host);
-       if (IS_ERR(shost))
-               return PTR_ERR(shost);
+       if (!shost)
+               return error;
        sdev = scsi_device_lookup(shost, channel, id, lun);
        if (sdev) {
                scsi_remove_device(sdev);