]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/scsi_transport_iscsi.c
MIPS: TXx9: Cache fixup
[linux-2.6-omap-h63xx.git] / drivers / scsi / scsi_transport_iscsi.c
index 3af7cbcc5c5d7c6f93822a2e7e29f15f17a7df13..0ce5f7cdfe2a182a1e4216377e58476b6e2f1809 100644 (file)
@@ -170,7 +170,7 @@ iscsi_create_endpoint(int dd_size)
        int err;
 
        for (id = 1; id < ISCSI_MAX_EPID; id++) {
-               dev = class_find_device(&iscsi_endpoint_class, &id,
+               dev = class_find_device(&iscsi_endpoint_class, NULL, &id,
                                        iscsi_match_epid);
                if (!dev)
                        break;
@@ -222,7 +222,7 @@ struct iscsi_endpoint *iscsi_lookup_endpoint(u64 handle)
        struct iscsi_endpoint *ep;
        struct device *dev;
 
-       dev = class_find_device(&iscsi_endpoint_class, &handle,
+       dev = class_find_device(&iscsi_endpoint_class, NULL, &handle,
                                iscsi_match_epid);
        if (!dev)
                return NULL;
@@ -247,8 +247,8 @@ static int iscsi_setup_host(struct transport_container *tc, struct device *dev,
        atomic_set(&ihost->nr_scans, 0);
        mutex_init(&ihost->mutex);
 
-       snprintf(ihost->scan_workq_name, KOBJ_NAME_LEN, "iscsi_scan_%d",
-               shost->host_no);
+       snprintf(ihost->scan_workq_name, sizeof(ihost->scan_workq_name),
+                "iscsi_scan_%d", shost->host_no);
        ihost->scan_workq = create_singlethread_workqueue(
                                                ihost->scan_workq_name);
        if (!ihost->scan_workq)
@@ -1361,7 +1361,7 @@ iscsi_tgt_dscvr(struct iscsi_transport *transport,
                return -EINVAL;
 
        shost = scsi_host_lookup(ev->u.tgt_dscvr.host_no);
-       if (IS_ERR(shost)) {
+       if (!shost) {
                printk(KERN_ERR "target discovery could not find host no %u\n",
                       ev->u.tgt_dscvr.host_no);
                return -ENODEV;
@@ -1387,7 +1387,7 @@ iscsi_set_host_param(struct iscsi_transport *transport,
                return -ENOSYS;
 
        shost = scsi_host_lookup(ev->u.set_host_param.host_no);
-       if (IS_ERR(shost)) {
+       if (!shost) {
                printk(KERN_ERR "set_host_param could not find host no %u\n",
                       ev->u.set_host_param.host_no);
                return -ENODEV;