aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/of_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/kernel/of_device.c')
-rw-r--r--arch/microblaze/kernel/of_device.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/microblaze/kernel/of_device.c b/arch/microblaze/kernel/of_device.c
index 9a0f7632c47c..b372787886ed 100644
--- a/arch/microblaze/kernel/of_device.c
+++ b/arch/microblaze/kernel/of_device.c
@@ -12,7 +12,7 @@
12void of_device_make_bus_id(struct of_device *dev) 12void of_device_make_bus_id(struct of_device *dev)
13{ 13{
14 static atomic_t bus_no_reg_magic; 14 static atomic_t bus_no_reg_magic;
15 struct device_node *node = dev->node; 15 struct device_node *node = dev->dev.of_node;
16 const u32 *reg; 16 const u32 *reg;
17 u64 addr; 17 u64 addr;
18 int magic; 18 int magic;
@@ -49,11 +49,10 @@ struct of_device *of_device_alloc(struct device_node *np,
49 if (!dev) 49 if (!dev)
50 return NULL; 50 return NULL;
51 51
52 dev->node = of_node_get(np); 52 dev->dev.of_node = of_node_get(np);
53 dev->dev.dma_mask = &dev->dma_mask; 53 dev->dev.dma_mask = &dev->archdata.dma_mask;
54 dev->dev.parent = parent; 54 dev->dev.parent = parent;
55 dev->dev.release = of_release_dev; 55 dev->dev.release = of_release_dev;
56 dev->dev.archdata.of_node = np;
57 56
58 if (bus_id) 57 if (bus_id)
59 dev_set_name(&dev->dev, bus_id); 58 dev_set_name(&dev->dev, bus_id);
@@ -75,17 +74,17 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
75 74
76 ofdev = to_of_device(dev); 75 ofdev = to_of_device(dev);
77 76
78 if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name)) 77 if (add_uevent_var(env, "OF_NAME=%s", ofdev->dev.of_node->name))
79 return -ENOMEM; 78 return -ENOMEM;
80 79
81 if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type)) 80 if (add_uevent_var(env, "OF_TYPE=%s", ofdev->dev.of_node->type))
82 return -ENOMEM; 81 return -ENOMEM;
83 82
84 /* Since the compatible field can contain pretty much anything 83 /* Since the compatible field can contain pretty much anything
85 * it's not really legal to split it out with commas. We split it 84 * it's not really legal to split it out with commas. We split it
86 * up using a number of environment variables instead. */ 85 * up using a number of environment variables instead. */
87 86
88 compat = of_get_property(ofdev->node, "compatible", &cplen); 87 compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen);
89 while (compat && *compat && cplen > 0) { 88 while (compat && *compat && cplen > 0) {
90 if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat)) 89 if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat))
91 return -ENOMEM; 90 return -ENOMEM;