diff options
author | David S. Miller <davem@davemloft.net> | 2009-01-08 11:05:59 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-08 11:05:59 -0800 |
commit | 7f46b1343f723f98634a5dcee47856b2000079ed (patch) | |
tree | ed22b6298c8dd2f687890a0d79abcd1d273b5f81 /drivers/w1/w1.c | |
parent | b8c31da64165b8566fc6e1c9c826f76e7b98ff02 (diff) | |
parent | 9e42d0cf5020aaf217433cad1a224745241d212a (diff) | |
download | linux-7f46b1343f723f98634a5dcee47856b2000079ed.tar.gz linux-7f46b1343f723f98634a5dcee47856b2000079ed.tar.bz2 linux-7f46b1343f723f98634a5dcee47856b2000079ed.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/w1/w1.c')
-rw-r--r-- | drivers/w1/w1.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 3b615d4022ee..acc7e3b7fe17 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -197,7 +197,7 @@ struct device_driver w1_master_driver = { struct device w1_master_device = { .parent = NULL, .bus = &w1_bus_type, - .bus_id = "w1 bus master", + .init_name = "w1 bus master", .driver = &w1_master_driver, .release = &w1_master_release }; @@ -211,7 +211,7 @@ static struct device_driver w1_slave_driver = { struct device w1_slave_device = { .parent = NULL, .bus = &w1_bus_type, - .bus_id = "w1 bus slave", + .init_name = "w1 bus slave", .driver = &w1_slave_driver, .release = &w1_slave_release }; @@ -573,7 +573,7 @@ static int w1_uevent(struct device *dev, struct kobj_uevent_env *env) } dev_dbg(dev, "Hotplug event for %s %s, bus_id=%s.\n", - event_owner, name, dev->bus_id); + event_owner, name, dev_name(dev)); if (dev->driver != &w1_slave_driver || !sl) return 0; @@ -605,8 +605,7 @@ static int __w1_attach_slave_device(struct w1_slave *sl) sl->dev.bus = &w1_bus_type; sl->dev.release = &w1_slave_release; - snprintf(&sl->dev.bus_id[0], sizeof(sl->dev.bus_id), - "%02x-%012llx", + dev_set_name(&sl->dev, "%02x-%012llx", (unsigned int) sl->reg_num.family, (unsigned long long) sl->reg_num.id); snprintf(&sl->name[0], sizeof(sl->name), @@ -615,13 +614,13 @@ static int __w1_attach_slave_device(struct w1_slave *sl) (unsigned long long) sl->reg_num.id); dev_dbg(&sl->dev, "%s: registering %s as %p.\n", __func__, - &sl->dev.bus_id[0], sl); + dev_name(&sl->dev), sl); err = device_register(&sl->dev); if (err < 0) { dev_err(&sl->dev, "Device registration [%s] failed. err=%d\n", - sl->dev.bus_id, err); + dev_name(&sl->dev), err); return err; } @@ -630,7 +629,7 @@ static int __w1_attach_slave_device(struct w1_slave *sl) if (err < 0) { dev_err(&sl->dev, "sysfs file creation for [%s] failed. err=%d\n", - sl->dev.bus_id, err); + dev_name(&sl->dev), err); goto out_unreg; } @@ -639,7 +638,7 @@ static int __w1_attach_slave_device(struct w1_slave *sl) if (err < 0) { dev_err(&sl->dev, "sysfs file creation for [%s] failed. err=%d\n", - sl->dev.bus_id, err); + dev_name(&sl->dev), err); goto out_rem1; } @@ -648,7 +647,7 @@ static int __w1_attach_slave_device(struct w1_slave *sl) ((err = sl->family->fops->add_slave(sl)) < 0)) { dev_err(&sl->dev, "sysfs file creation for [%s] failed. err=%d\n", - sl->dev.bus_id, err); + dev_name(&sl->dev), err); goto out_rem2; } |