提交 a1f64819 编写于 作者: K Kay Sievers 提交者: Stefan Richter

firewire: struct device - replace bus_id with dev_name(), dev_set_name()

Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
上级 cd1f70fd
...@@ -587,8 +587,7 @@ static void create_units(struct fw_device *device) ...@@ -587,8 +587,7 @@ static void create_units(struct fw_device *device)
unit->device.bus = &fw_bus_type; unit->device.bus = &fw_bus_type;
unit->device.type = &fw_unit_type; unit->device.type = &fw_unit_type;
unit->device.parent = &device->device; unit->device.parent = &device->device;
snprintf(unit->device.bus_id, sizeof(unit->device.bus_id), dev_set_name(&unit->device, "%s.%d", dev_name(&device->device), i++);
"%s.%d", device->device.bus_id, i++);
init_fw_attribute_group(&unit->device, init_fw_attribute_group(&unit->device,
fw_unit_attributes, fw_unit_attributes,
...@@ -711,8 +710,7 @@ static void fw_device_init(struct work_struct *work) ...@@ -711,8 +710,7 @@ static void fw_device_init(struct work_struct *work)
device->device.type = &fw_device_type; device->device.type = &fw_device_type;
device->device.parent = device->card->device; device->device.parent = device->card->device;
device->device.devt = MKDEV(fw_cdev_major, minor); device->device.devt = MKDEV(fw_cdev_major, minor);
snprintf(device->device.bus_id, sizeof(device->device.bus_id), dev_set_name(&device->device, "fw%d", minor);
"fw%d", minor);
init_fw_attribute_group(&device->device, init_fw_attribute_group(&device->device,
fw_device_attributes, fw_device_attributes,
...@@ -741,13 +739,13 @@ static void fw_device_init(struct work_struct *work) ...@@ -741,13 +739,13 @@ static void fw_device_init(struct work_struct *work)
if (device->config_rom_retries) if (device->config_rom_retries)
fw_notify("created device %s: GUID %08x%08x, S%d00, " fw_notify("created device %s: GUID %08x%08x, S%d00, "
"%d config ROM retries\n", "%d config ROM retries\n",
device->device.bus_id, dev_name(&device->device),
device->config_rom[3], device->config_rom[4], device->config_rom[3], device->config_rom[4],
1 << device->max_speed, 1 << device->max_speed,
device->config_rom_retries); device->config_rom_retries);
else else
fw_notify("created device %s: GUID %08x%08x, S%d00\n", fw_notify("created device %s: GUID %08x%08x, S%d00\n",
device->device.bus_id, dev_name(&device->device),
device->config_rom[3], device->config_rom[4], device->config_rom[3], device->config_rom[4],
1 << device->max_speed); 1 << device->max_speed);
device->config_rom_retries = 0; device->config_rom_retries = 0;
...@@ -883,12 +881,12 @@ static void fw_device_refresh(struct work_struct *work) ...@@ -883,12 +881,12 @@ static void fw_device_refresh(struct work_struct *work)
FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN) FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN)
goto gone; goto gone;
fw_notify("refreshed device %s\n", device->device.bus_id); fw_notify("refreshed device %s\n", dev_name(&device->device));
device->config_rom_retries = 0; device->config_rom_retries = 0;
goto out; goto out;
give_up: give_up:
fw_notify("giving up on refresh of device %s\n", device->device.bus_id); fw_notify("giving up on refresh of device %s\n", dev_name(&device->device));
gone: gone:
atomic_set(&device->state, FW_DEVICE_SHUTDOWN); atomic_set(&device->state, FW_DEVICE_SHUTDOWN);
fw_device_shutdown(work); fw_device_shutdown(work);
......
...@@ -2468,7 +2468,7 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) ...@@ -2468,7 +2468,7 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
goto fail_self_id; goto fail_self_id;
fw_notify("Added fw-ohci device %s, OHCI version %x.%x\n", fw_notify("Added fw-ohci device %s, OHCI version %x.%x\n",
dev->dev.bus_id, version >> 16, version & 0xff); dev_name(&dev->dev), version >> 16, version & 0xff);
return 0; return 0;
fail_self_id: fail_self_id:
......
...@@ -1135,7 +1135,7 @@ static int sbp2_probe(struct device *dev) ...@@ -1135,7 +1135,7 @@ static int sbp2_probe(struct device *dev)
tgt->unit = unit; tgt->unit = unit;
kref_init(&tgt->kref); kref_init(&tgt->kref);
INIT_LIST_HEAD(&tgt->lu_list); INIT_LIST_HEAD(&tgt->lu_list);
tgt->bus_id = unit->device.bus_id; tgt->bus_id = dev_name(&unit->device);
tgt->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4]; tgt->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4];
if (fw_device_enable_phys_dma(device) < 0) if (fw_device_enable_phys_dma(device) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册