sh: 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>
This commit is contained in:
Родитель
65a212dd71
Коммит
1692713ee9
|
@ -424,7 +424,7 @@ static void maple_attach_driver(struct maple_device *mdev)
|
||||||
/* Do this silently - as not a real device */
|
/* Do this silently - as not a real device */
|
||||||
function = 0;
|
function = 0;
|
||||||
mdev->driver = &maple_dummy_driver;
|
mdev->driver = &maple_dummy_driver;
|
||||||
sprintf(mdev->dev.bus_id, "%d:0.port", mdev->port);
|
dev_set_name(&mdev->dev, "%d:0.port", mdev->port);
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_INFO
|
printk(KERN_INFO
|
||||||
"Maple bus at (%d, %d): Function 0x%lX\n",
|
"Maple bus at (%d, %d): Function 0x%lX\n",
|
||||||
|
@ -440,7 +440,7 @@ static void maple_attach_driver(struct maple_device *mdev)
|
||||||
"No maple driver found.\n");
|
"No maple driver found.\n");
|
||||||
mdev->driver = &maple_dummy_driver;
|
mdev->driver = &maple_dummy_driver;
|
||||||
}
|
}
|
||||||
sprintf(mdev->dev.bus_id, "%d:0%d.%lX", mdev->port,
|
dev_set_name(&mdev->dev, "%d:0%d.%lX", mdev->port,
|
||||||
mdev->unit, function);
|
mdev->unit, function);
|
||||||
}
|
}
|
||||||
mdev->function = function;
|
mdev->function = function;
|
||||||
|
@ -780,7 +780,7 @@ struct bus_type maple_bus_type = {
|
||||||
EXPORT_SYMBOL_GPL(maple_bus_type);
|
EXPORT_SYMBOL_GPL(maple_bus_type);
|
||||||
|
|
||||||
static struct device maple_bus = {
|
static struct device maple_bus = {
|
||||||
.bus_id = "maple",
|
.init_name = "maple",
|
||||||
.release = maple_bus_release,
|
.release = maple_bus_release,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
static int superhyway_devices;
|
static int superhyway_devices;
|
||||||
|
|
||||||
static struct device superhyway_bus_device = {
|
static struct device superhyway_bus_device = {
|
||||||
.bus_id = "superhyway",
|
.init_name = "superhyway",
|
||||||
};
|
};
|
||||||
|
|
||||||
static void superhyway_device_release(struct device *dev)
|
static void superhyway_device_release(struct device *dev)
|
||||||
|
@ -83,7 +83,7 @@ int superhyway_add_device(unsigned long base, struct superhyway_device *sdev,
|
||||||
dev->id.id = dev->vcr.mod_id;
|
dev->id.id = dev->vcr.mod_id;
|
||||||
|
|
||||||
sprintf(dev->name, "SuperHyway device %04x", dev->id.id);
|
sprintf(dev->name, "SuperHyway device %04x", dev->id.id);
|
||||||
sprintf(dev->dev.bus_id, "%02x", superhyway_devices);
|
dev_set_name(&dev->dev, "%02x", superhyway_devices);
|
||||||
|
|
||||||
superhyway_devices++;
|
superhyway_devices++;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче