-static int add_scsi_devices(struct fw_unit *unit)
-{
- struct sbp2_device *sd = unit->device.driver_data;
- int retval, lun;
-
- if (sd->scsi_host != NULL)
- return 0;
-
- sd->scsi_host = scsi_host_alloc(&scsi_driver_template,
- sizeof(unsigned long));
- if (sd->scsi_host == NULL) {
- fw_error("failed to register scsi host\n");
- return -1;
- }
-
- sd->scsi_host->hostdata[0] = (unsigned long)unit;
- retval = scsi_add_host(sd->scsi_host, &unit->device);
- if (retval < 0) {
- fw_error("failed to add scsi host\n");
- scsi_host_put(sd->scsi_host);
- sd->scsi_host = NULL;
- return retval;
- }
-
- /* FIXME: Loop over luns here. */
- lun = 0;
- retval = scsi_add_device(sd->scsi_host, 0, 0, lun);
- if (retval < 0) {
- fw_error("failed to add scsi device\n");
- scsi_remove_host(sd->scsi_host);
- scsi_host_put(sd->scsi_host);
- sd->scsi_host = NULL;
- return retval;
- }
-
- return 0;
-}
-
-static void remove_scsi_devices(struct fw_unit *unit)
-{
- struct sbp2_device *sd = unit->device.driver_data;
-
- if (sd->scsi_host != NULL) {
- scsi_remove_host(sd->scsi_host);
- scsi_host_put(sd->scsi_host);
- }
- sd->scsi_host = NULL;
-}
-