浏览代码

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>
Kay Sievers 16 年之前
父节点
当前提交
cd3ed6b4dd
共有 3 个文件被更改,包括 6 次插入6 次删除
  1. 4 4
      drivers/message/i2o/device.c
  2. 1 1
      drivers/message/i2o/i2o_proc.c
  3. 1 1
      drivers/message/i2o/iop.c

+ 4 - 4
drivers/message/i2o/device.c

@@ -134,7 +134,7 @@ static void i2o_device_release(struct device *dev)
 {
 {
 	struct i2o_device *i2o_dev = to_i2o_device(dev);
 	struct i2o_device *i2o_dev = to_i2o_device(dev);
 
 
-	pr_debug("i2o: device %s released\n", dev->bus_id);
+	pr_debug("i2o: device %s released\n", dev_name(dev));
 
 
 	kfree(i2o_dev);
 	kfree(i2o_dev);
 }
 }
@@ -229,8 +229,8 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
 
 
 	i2o_dev->lct_data = *entry;
 	i2o_dev->lct_data = *entry;
 
 
-	snprintf(i2o_dev->device.bus_id, BUS_ID_SIZE, "%d:%03x", c->unit,
-		 i2o_dev->lct_data.tid);
+	dev_set_name(&i2o_dev->device, "%d:%03x", c->unit,
+		     i2o_dev->lct_data.tid);
 
 
 	i2o_dev->iop = c;
 	i2o_dev->iop = c;
 	i2o_dev->device.parent = &c->device;
 	i2o_dev->device.parent = &c->device;
@@ -281,7 +281,7 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
 
 
 	i2o_driver_notify_device_add_all(i2o_dev);
 	i2o_driver_notify_device_add_all(i2o_dev);
 
 
-	pr_debug("i2o: device %s added\n", i2o_dev->device.bus_id);
+	pr_debug("i2o: device %s added\n", dev_name(&i2o_dev->device));
 
 
 	return 0;
 	return 0;
 
 

+ 1 - 1
drivers/message/i2o/i2o_proc.c

@@ -1300,7 +1300,7 @@ static int i2o_seq_show_dev_name(struct seq_file *seq, void *v)
 {
 {
 	struct i2o_device *d = (struct i2o_device *)seq->private;
 	struct i2o_device *d = (struct i2o_device *)seq->private;
 
 
-	seq_printf(seq, "%s\n", d->device.bus_id);
+	seq_printf(seq, "%s\n", dev_name(&d->device));
 
 
 	return 0;
 	return 0;
 }
 }

+ 1 - 1
drivers/message/i2o/iop.c

@@ -1072,7 +1072,7 @@ struct i2o_controller *i2o_iop_alloc(void)
 
 
 	c->device.release = &i2o_iop_release;
 	c->device.release = &i2o_iop_release;
 
 
-	snprintf(c->device.bus_id, BUS_ID_SIZE, "iop%d", c->unit);
+	dev_set_name(&c->device, "iop%d", c->unit);
 
 
 #if BITS_PER_LONG == 64
 #if BITS_PER_LONG == 64
 	spin_lock_init(&c->context_list_lock);
 	spin_lock_init(&c->context_list_lock);