Skip to content

Commit cd3ed6b

Browse files
kaysieversgregkh
authored andcommitted
i2o: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 48ef2bb commit cd3ed6b

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎drivers/message/i2o/device.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static void i2o_device_release(struct device *dev)
134134
{
135135
struct i2o_device *i2o_dev = to_i2o_device(dev);
136136

137-
pr_debug("i2o: device %s released\n", dev->bus_id);
137+
pr_debug("i2o: device %s released\n", dev_name(dev));
138138

139139
kfree(i2o_dev);
140140
}
@@ -229,8 +229,8 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
229229

230230
i2o_dev->lct_data = *entry;
231231

232-
snprintf(i2o_dev->device.bus_id, BUS_ID_SIZE, "%d:%03x", c->unit,
233-
i2o_dev->lct_data.tid);
232+
dev_set_name(&i2o_dev->device, "%d:%03x", c->unit,
233+
i2o_dev->lct_data.tid);
234234

235235
i2o_dev->iop = c;
236236
i2o_dev->device.parent = &c->device;
@@ -281,7 +281,7 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
281281

282282
i2o_driver_notify_device_add_all(i2o_dev);
283283

284-
pr_debug("i2o: device %s added\n", i2o_dev->device.bus_id);
284+
pr_debug("i2o: device %s added\n", dev_name(&i2o_dev->device));
285285

286286
return 0;
287287

‎drivers/message/i2o/i2o_proc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ static int i2o_seq_show_dev_name(struct seq_file *seq, void *v)
13001300
{
13011301
struct i2o_device *d = (struct i2o_device *)seq->private;
13021302

1303-
seq_printf(seq, "%s\n", d->device.bus_id);
1303+
seq_printf(seq, "%s\n", dev_name(&d->device));
13041304

13051305
return 0;
13061306
}

‎drivers/message/i2o/iop.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ struct i2o_controller *i2o_iop_alloc(void)
10721072

10731073
c->device.release = &i2o_iop_release;
10741074

1075-
snprintf(c->device.bus_id, BUS_ID_SIZE, "iop%d", c->unit);
1075+
dev_set_name(&c->device, "iop%d", c->unit);
10761076

10771077
#if BITS_PER_LONG == 64
10781078
spin_lock_init(&c->context_list_lock);

0 commit comments

Comments
 (0)