diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-10-29 20:41:56 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-10-31 03:48:25 -0400 |
commit | a1f64819fe9f136c98d572794a35a7e377c951ef (patch) | |
tree | 9e5c7b3c4d45c319838b75cb014cc03d8c29cd65 /drivers | |
parent | cd1f70fdb4823c97328a1f151f328eb36fafd579 (diff) |
firewire: struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firewire/fw-device.c | 14 | ||||
-rw-r--r-- | drivers/firewire/fw-ohci.c | 2 | ||||
-rw-r--r-- | drivers/firewire/fw-sbp2.c | 2 |
3 files changed, 8 insertions, 10 deletions
diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c index 3fccdd484100..6b9be42c7b98 100644 --- a/drivers/firewire/fw-device.c +++ b/drivers/firewire/fw-device.c | |||
@@ -587,8 +587,7 @@ static void create_units(struct fw_device *device) | |||
587 | unit->device.bus = &fw_bus_type; | 587 | unit->device.bus = &fw_bus_type; |
588 | unit->device.type = &fw_unit_type; | 588 | unit->device.type = &fw_unit_type; |
589 | unit->device.parent = &device->device; | 589 | unit->device.parent = &device->device; |
590 | snprintf(unit->device.bus_id, sizeof(unit->device.bus_id), | 590 | dev_set_name(&unit->device, "%s.%d", dev_name(&device->device), i++); |
591 | "%s.%d", device->device.bus_id, i++); | ||
592 | 591 | ||
593 | init_fw_attribute_group(&unit->device, | 592 | init_fw_attribute_group(&unit->device, |
594 | fw_unit_attributes, | 593 | fw_unit_attributes, |
@@ -711,8 +710,7 @@ static void fw_device_init(struct work_struct *work) | |||
711 | device->device.type = &fw_device_type; | 710 | device->device.type = &fw_device_type; |
712 | device->device.parent = device->card->device; | 711 | device->device.parent = device->card->device; |
713 | device->device.devt = MKDEV(fw_cdev_major, minor); | 712 | device->device.devt = MKDEV(fw_cdev_major, minor); |
714 | snprintf(device->device.bus_id, sizeof(device->device.bus_id), | 713 | dev_set_name(&device->device, "fw%d", minor); |
715 | "fw%d", minor); | ||
716 | 714 | ||
717 | init_fw_attribute_group(&device->device, | 715 | init_fw_attribute_group(&device->device, |
718 | fw_device_attributes, | 716 | fw_device_attributes, |
@@ -741,13 +739,13 @@ static void fw_device_init(struct work_struct *work) | |||
741 | if (device->config_rom_retries) | 739 | if (device->config_rom_retries) |
742 | fw_notify("created device %s: GUID %08x%08x, S%d00, " | 740 | fw_notify("created device %s: GUID %08x%08x, S%d00, " |
743 | "%d config ROM retries\n", | 741 | "%d config ROM retries\n", |
744 | device->device.bus_id, | 742 | dev_name(&device->device), |
745 | device->config_rom[3], device->config_rom[4], | 743 | device->config_rom[3], device->config_rom[4], |
746 | 1 << device->max_speed, | 744 | 1 << device->max_speed, |
747 | device->config_rom_retries); | 745 | device->config_rom_retries); |
748 | else | 746 | else |
749 | fw_notify("created device %s: GUID %08x%08x, S%d00\n", | 747 | fw_notify("created device %s: GUID %08x%08x, S%d00\n", |
750 | device->device.bus_id, | 748 | dev_name(&device->device), |
751 | device->config_rom[3], device->config_rom[4], | 749 | device->config_rom[3], device->config_rom[4], |
752 | 1 << device->max_speed); | 750 | 1 << device->max_speed); |
753 | device->config_rom_retries = 0; | 751 | device->config_rom_retries = 0; |
@@ -883,12 +881,12 @@ static void fw_device_refresh(struct work_struct *work) | |||
883 | FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN) | 881 | FW_DEVICE_RUNNING) == FW_DEVICE_SHUTDOWN) |
884 | goto gone; | 882 | goto gone; |
885 | 883 | ||
886 | fw_notify("refreshed device %s\n", device->device.bus_id); | 884 | fw_notify("refreshed device %s\n", dev_name(&device->device)); |
887 | device->config_rom_retries = 0; | 885 | device->config_rom_retries = 0; |
888 | goto out; | 886 | goto out; |
889 | 887 | ||
890 | give_up: | 888 | give_up: |
891 | fw_notify("giving up on refresh of device %s\n", device->device.bus_id); | 889 | fw_notify("giving up on refresh of device %s\n", dev_name(&device->device)); |
892 | gone: | 890 | gone: |
893 | atomic_set(&device->state, FW_DEVICE_SHUTDOWN); | 891 | atomic_set(&device->state, FW_DEVICE_SHUTDOWN); |
894 | fw_device_shutdown(work); | 892 | fw_device_shutdown(work); |
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index 8e16bfbdcb3d..46610b090415 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c | |||
@@ -2468,7 +2468,7 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2468 | goto fail_self_id; | 2468 | goto fail_self_id; |
2469 | 2469 | ||
2470 | fw_notify("Added fw-ohci device %s, OHCI version %x.%x\n", | 2470 | fw_notify("Added fw-ohci device %s, OHCI version %x.%x\n", |
2471 | dev->dev.bus_id, version >> 16, version & 0xff); | 2471 | dev_name(&dev->dev), version >> 16, version & 0xff); |
2472 | return 0; | 2472 | return 0; |
2473 | 2473 | ||
2474 | fail_self_id: | 2474 | fail_self_id: |
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index d334cac5e1fc..97df6dac3a82 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c | |||
@@ -1135,7 +1135,7 @@ static int sbp2_probe(struct device *dev) | |||
1135 | tgt->unit = unit; | 1135 | tgt->unit = unit; |
1136 | kref_init(&tgt->kref); | 1136 | kref_init(&tgt->kref); |
1137 | INIT_LIST_HEAD(&tgt->lu_list); | 1137 | INIT_LIST_HEAD(&tgt->lu_list); |
1138 | tgt->bus_id = unit->device.bus_id; | 1138 | tgt->bus_id = dev_name(&unit->device); |
1139 | tgt->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4]; | 1139 | tgt->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4]; |
1140 | 1140 | ||
1141 | if (fw_device_enable_phys_dma(device) < 0) | 1141 | if (fw_device_enable_phys_dma(device) < 0) |