Commit 3d61cad0 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Remove usage of struct device.name from scsi core

parent b14d0fee
...@@ -1566,7 +1566,6 @@ device_initcall(scsi_debug_init); ...@@ -1566,7 +1566,6 @@ device_initcall(scsi_debug_init);
module_exit(scsi_debug_exit); module_exit(scsi_debug_exit);
static struct device pseudo_primary = { static struct device pseudo_primary = {
.name = "Host/Pseudo Bridge",
.bus_id = "pseudo_0", .bus_id = "pseudo_0",
}; };
...@@ -1630,7 +1629,6 @@ static int sdebug_add_adapter() ...@@ -1630,7 +1629,6 @@ static int sdebug_add_adapter()
sdbg_host->dev.bus = &pseudo_lld_bus; sdbg_host->dev.bus = &pseudo_lld_bus;
sdbg_host->dev.parent = &pseudo_primary; sdbg_host->dev.parent = &pseudo_primary;
sdbg_host->dev.release = &sdebug_release_adapter; sdbg_host->dev.release = &sdebug_release_adapter;
sprintf(sdbg_host->dev.name, "scsi debug adapter");
sprintf(sdbg_host->dev.bus_id, "adapter%d", scsi_debug_add_host); sprintf(sdbg_host->dev.bus_id, "adapter%d", scsi_debug_add_host);
error = device_register(&sdbg_host->dev); error = device_register(&sdbg_host->dev);
......
...@@ -447,24 +447,6 @@ static void scsi_probe_lun(struct scsi_request *sreq, char *inq_result, ...@@ -447,24 +447,6 @@ static void scsi_probe_lun(struct scsi_request *sreq, char *inq_result,
return; return;
} }
static void scsi_set_name(struct scsi_device *sdev, char *inq_result)
{
int i;
char type[72];
i = inq_result[0] & 0x1f;
if (i < MAX_SCSI_DEVICE_CODE)
strcpy(type, scsi_device_types[i]);
else
strcpy(type, "Unknown");
i = strlen(type) - 1;
while (i >= 0 && type[i] == ' ')
type[i--] = '\0';
snprintf(sdev->sdev_gendev.name, DEVICE_NAME_SIZE, "SCSI %s", type);
}
/** /**
* scsi_add_lun - allocate and fully initialze a Scsi_Device * scsi_add_lun - allocate and fully initialze a Scsi_Device
* @sdevscan: holds information to be stored in the new Scsi_Device * @sdevscan: holds information to be stored in the new Scsi_Device
...@@ -539,8 +521,6 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags) ...@@ -539,8 +521,6 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
printk(KERN_INFO "scsi: unknown device type %d\n", sdev->type); printk(KERN_INFO "scsi: unknown device type %d\n", sdev->type);
} }
scsi_set_name(sdev, inq_result);
print_inquiry(inq_result); print_inquiry(inq_result);
/* /*
......
...@@ -408,8 +408,6 @@ void scsi_sysfs_init_host(struct Scsi_Host *shost) ...@@ -408,8 +408,6 @@ void scsi_sysfs_init_host(struct Scsi_Host *shost)
device_initialize(&shost->shost_gendev); device_initialize(&shost->shost_gendev);
snprintf(shost->shost_gendev.bus_id, BUS_ID_SIZE, "host%d", snprintf(shost->shost_gendev.bus_id, BUS_ID_SIZE, "host%d",
shost->host_no); shost->host_no);
snprintf(shost->shost_gendev.name, DEVICE_NAME_SIZE, "%s",
shost->hostt->proc_name);
shost->shost_gendev.release = scsi_host_dev_release; shost->shost_gendev.release = scsi_host_dev_release;
class_device_initialize(&shost->shost_classdev); class_device_initialize(&shost->shost_classdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment