aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-04-13 19:12:29 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-18 18:10:44 -0400
commit61c7a080a5a061c976988fd4b844dfb468dda255 (patch)
tree8cb492b73f2755c38a6164d770da34d5af6486a0 /drivers/sbus
parentd12d42f744f805a9ccc33cd76f04b237cd83ce56 (diff)
of: Always use 'struct device.of_node' to get device node pointer.
The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/sbus')
-rw-r--r--drivers/sbus/char/bbc_envctrl.c4
-rw-r--r--drivers/sbus/char/bbc_i2c.c4
-rw-r--r--drivers/sbus/char/display7seg.c2
-rw-r--r--drivers/sbus/char/envctrl.c2
-rw-r--r--drivers/sbus/char/flash.c4
-rw-r--r--drivers/sbus/char/uctrl.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c
index b4951eb0358e..103fdf6b0b89 100644
--- a/drivers/sbus/char/bbc_envctrl.c
+++ b/drivers/sbus/char/bbc_envctrl.c
@@ -565,9 +565,9 @@ int bbc_envctrl_init(struct bbc_i2c_bus *bp)
565 int devidx = 0; 565 int devidx = 0;
566 566
567 while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) { 567 while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) {
568 if (!strcmp(op->node->name, "temperature")) 568 if (!strcmp(op->dev.of_node->name, "temperature"))
569 attach_one_temp(bp, op, temp_index++); 569 attach_one_temp(bp, op, temp_index++);
570 if (!strcmp(op->node->name, "fan-control")) 570 if (!strcmp(op->dev.of_node->name, "fan-control"))
571 attach_one_fan(bp, op, fan_index++); 571 attach_one_fan(bp, op, fan_index++);
572 } 572 }
573 if (temp_index != 0 && fan_index != 0) { 573 if (temp_index != 0 && fan_index != 0) {
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index 7e30e5f6e032..1543ac32b79b 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -97,7 +97,7 @@ struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *
97 client->bp = bp; 97 client->bp = bp;
98 client->op = op; 98 client->op = op;
99 99
100 reg = of_get_property(op->node, "reg", NULL); 100 reg = of_get_property(op->dev.of_node, "reg", NULL);
101 if (!reg) { 101 if (!reg) {
102 kfree(client); 102 kfree(client);
103 return NULL; 103 return NULL;
@@ -327,7 +327,7 @@ static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int inde
327 spin_lock_init(&bp->lock); 327 spin_lock_init(&bp->lock);
328 328
329 entry = 0; 329 entry = 0;
330 for (dp = op->node->child; 330 for (dp = op->dev.of_node->child;
331 dp && entry < 8; 331 dp && entry < 8;
332 dp = dp->sibling, entry++) { 332 dp = dp->sibling, entry++) {
333 struct of_device *child_op; 333 struct of_device *child_op;
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index 3e59189f4137..7fc7f34f3466 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -216,7 +216,7 @@ static int __devinit d7s_probe(struct of_device *op,
216 writeb(regs, p->regs); 216 writeb(regs, p->regs);
217 217
218 printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%llx] %s\n", 218 printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%llx] %s\n",
219 op->node->full_name, 219 op->dev.of_node->full_name,
220 (regs & D7S_FLIP) ? " (FLIPPED)" : "", 220 (regs & D7S_FLIP) ? " (FLIPPED)" : "",
221 op->resource[0].start, 221 op->resource[0].start,
222 sol_compat ? "in sol_compat mode" : ""); 222 sol_compat ? "in sol_compat mode" : "");
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index c6e2eff19409..a5fe20faf4f7 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -1043,7 +1043,7 @@ static int __devinit envctrl_probe(struct of_device *op,
1043 return -ENOMEM; 1043 return -ENOMEM;
1044 1044
1045 index = 0; 1045 index = 0;
1046 dp = op->node->child; 1046 dp = op->dev.of_node->child;
1047 while (dp) { 1047 while (dp) {
1048 if (!strcmp(dp->name, "gpio")) { 1048 if (!strcmp(dp->name, "gpio")) {
1049 i2c_childlist[index].i2ctype = I2C_GPIO; 1049 i2c_childlist[index].i2ctype = I2C_GPIO;
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 19f255b97c86..202ff8f75afb 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -162,7 +162,7 @@ static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
162static int __devinit flash_probe(struct of_device *op, 162static int __devinit flash_probe(struct of_device *op,
163 const struct of_device_id *match) 163 const struct of_device_id *match)
164{ 164{
165 struct device_node *dp = op->node; 165 struct device_node *dp = op->dev.of_node;
166 struct device_node *parent; 166 struct device_node *parent;
167 167
168 parent = dp->parent; 168 parent = dp->parent;
@@ -184,7 +184,7 @@ static int __devinit flash_probe(struct of_device *op,
184 flash.busy = 0; 184 flash.busy = 0;
185 185
186 printk(KERN_INFO "%s: OBP Flash, RD %lx[%lx] WR %lx[%lx]\n", 186 printk(KERN_INFO "%s: OBP Flash, RD %lx[%lx] WR %lx[%lx]\n",
187 op->node->full_name, 187 op->dev.of_node->full_name,
188 flash.read_base, flash.read_size, 188 flash.read_base, flash.read_size,
189 flash.write_base, flash.write_size); 189 flash.write_base, flash.write_size);
190 190
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index 2c56fd56ec63..acc6738aa61f 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -382,7 +382,7 @@ static int __devinit uctrl_probe(struct of_device *op,
382 382
383 sbus_writel(UCTRL_INTR_RXNE_REQ|UCTRL_INTR_RXNE_MSK, &p->regs->uctrl_intr); 383 sbus_writel(UCTRL_INTR_RXNE_REQ|UCTRL_INTR_RXNE_MSK, &p->regs->uctrl_intr);
384 printk(KERN_INFO "%s: uctrl regs[0x%p] (irq %d)\n", 384 printk(KERN_INFO "%s: uctrl regs[0x%p] (irq %d)\n",
385 op->node->full_name, p->regs, p->irq); 385 op->dev.of_node->full_name, p->regs, p->irq);
386 uctrl_get_event_status(p); 386 uctrl_get_event_status(p);
387 uctrl_get_external_status(p); 387 uctrl_get_external_status(p);
388 388