]> Pileus Git - ~andy/linux/blobdiff - drivers/firewire/sbp2.c
usb: dwc3: gadget: move direction setting up
[~andy/linux] / drivers / firewire / sbp2.c
index 47674b91384321bd16b4dfa5c4ec69c190a80551..281029daf98c7ea291886d46ecf05378bfa98718 100644 (file)
@@ -1128,11 +1128,10 @@ static void sbp2_init_workarounds(struct sbp2_target *tgt, u32 model,
 }
 
 static struct scsi_host_template scsi_driver_template;
-static int sbp2_remove(struct device *dev);
+static void sbp2_remove(struct fw_unit *unit);
 
-static int sbp2_probe(struct device *dev)
+static int sbp2_probe(struct fw_unit *unit, const struct ieee1394_device_id *id)
 {
-       struct fw_unit *unit = fw_unit(dev);
        struct fw_device *device = fw_parent_device(unit);
        struct sbp2_target *tgt;
        struct sbp2_logical_unit *lu;
@@ -1196,7 +1195,7 @@ static int sbp2_probe(struct device *dev)
        return 0;
 
  fail_remove:
-       sbp2_remove(dev);
+       sbp2_remove(unit);
        return -ENOMEM;
 
  fail_shost_put:
@@ -1222,9 +1221,8 @@ static void sbp2_update(struct fw_unit *unit)
        }
 }
 
-static int sbp2_remove(struct device *dev)
+static void sbp2_remove(struct fw_unit *unit)
 {
-       struct fw_unit *unit = fw_unit(dev);
        struct fw_device *device = fw_parent_device(unit);
        struct sbp2_target *tgt = dev_get_drvdata(&unit->device);
        struct sbp2_logical_unit *lu, *next;
@@ -1261,10 +1259,9 @@ static int sbp2_remove(struct device *dev)
                kfree(lu);
        }
        scsi_remove_host(shost);
-       dev_notice(dev, "released target %d:0:0\n", shost->host_no);
+       dev_notice(&unit->device, "released target %d:0:0\n", shost->host_no);
 
        scsi_host_put(shost);
-       return 0;
 }
 
 #define SBP2_UNIT_SPEC_ID_ENTRY        0x0000609e
@@ -1285,10 +1282,10 @@ static struct fw_driver sbp2_driver = {
                .owner  = THIS_MODULE,
                .name   = KBUILD_MODNAME,
                .bus    = &fw_bus_type,
-               .probe  = sbp2_probe,
-               .remove = sbp2_remove,
        },
+       .probe    = sbp2_probe,
        .update   = sbp2_update,
+       .remove   = sbp2_remove,
        .id_table = sbp2_id_table,
 };