Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit cd748420 authored by Vaishnav Achath's avatar Vaishnav Achath Committed by Robert Nelson
Browse files

w1: change device name in w1_attach_slave


currently if there is more than one device with the same
ROM ID, there will be a conflict even if the devices are
on different w1 master.

Signed-off-by: default avatarVaishnav M A <vaishnav@beagleboard.org>
parent e9bdf182
Tags
No related merge requests found
......@@ -681,7 +681,8 @@ static int __w1_attach_slave_device(struct w1_slave *sl)
sl->dev.of_node = of_find_matching_node(sl->master->dev.of_node,
sl->family->of_match_table);
dev_set_name(&sl->dev, "%02x-%012llx",
dev_set_name(&sl->dev, "%s-%02x-%012llx",
sl->master->name,
(unsigned int) sl->reg_num.family,
(unsigned long long) sl->reg_num.id);
snprintf(&sl->name[0], sizeof(sl->name),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment