Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143280
b: refs/heads/master
c: 5a86dc1
h: refs/heads/master
v: v3
  • Loading branch information
Michal Simek committed Apr 14, 2009
1 parent 9c82e8c commit 6ee9bdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a8fb748e89957426fafb2e2efccd5ce635d6f530
refs/heads/master: 5a86dc1a749211fd87341ee7943f985cde71ea11
10 changes: 4 additions & 6 deletions trunk/arch/microblaze/kernel/of_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ void of_device_make_bus_id(struct of_device *dev)
{
static atomic_t bus_no_reg_magic;
struct device_node *node = dev->node;
char *name = dev->dev.bus_id;
const u32 *reg;
u64 addr;
int magic;
Expand All @@ -25,9 +24,8 @@ void of_device_make_bus_id(struct of_device *dev)
if (reg) {
addr = of_translate_address(node, reg);
if (addr != OF_BAD_ADDR) {
snprintf(name, BUS_ID_SIZE,
"%llx.%s", (unsigned long long)addr,
node->name);
dev_set_name(&dev->dev, "%llx.%s",
(unsigned long long)addr, node->name);
return;
}
}
Expand All @@ -37,7 +35,7 @@ void of_device_make_bus_id(struct of_device *dev)
* counter (and pray...)
*/
magic = atomic_add_return(1, &bus_no_reg_magic);
snprintf(name, BUS_ID_SIZE, "%s.%d", node->name, magic - 1);
dev_set_name(&dev->dev, "%s.%d", node->name, magic - 1);
}
EXPORT_SYMBOL(of_device_make_bus_id);

Expand All @@ -58,7 +56,7 @@ struct of_device *of_device_alloc(struct device_node *np,
dev->dev.archdata.of_node = np;

if (bus_id)
strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE);
dev_set_name(&dev->dev, bus_id);
else
of_device_make_bus_id(dev);

Expand Down

0 comments on commit 6ee9bdc

Please sign in to comment.