diff options
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/bbc_envctrl.c | 4 | ||||
-rw-r--r-- | drivers/sbus/char/bbc_i2c.c | 11 | ||||
-rw-r--r-- | drivers/sbus/char/display7seg.c | 9 | ||||
-rw-r--r-- | drivers/sbus/char/envctrl.c | 9 | ||||
-rw-r--r-- | drivers/sbus/char/flash.c | 17 | ||||
-rw-r--r-- | drivers/sbus/char/uctrl.c | 9 |
6 files changed, 37 insertions, 22 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..8bfdd63a1fcb 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; |
@@ -414,8 +414,11 @@ static const struct of_device_id bbc_i2c_match[] = { | |||
414 | MODULE_DEVICE_TABLE(of, bbc_i2c_match); | 414 | MODULE_DEVICE_TABLE(of, bbc_i2c_match); |
415 | 415 | ||
416 | static struct of_platform_driver bbc_i2c_driver = { | 416 | static struct of_platform_driver bbc_i2c_driver = { |
417 | .name = "bbc_i2c", | 417 | .driver = { |
418 | .match_table = bbc_i2c_match, | 418 | .name = "bbc_i2c", |
419 | .owner = THIS_MODULE, | ||
420 | .of_match_table = bbc_i2c_match, | ||
421 | }, | ||
419 | .probe = bbc_i2c_probe, | 422 | .probe = bbc_i2c_probe, |
420 | .remove = __devexit_p(bbc_i2c_remove), | 423 | .remove = __devexit_p(bbc_i2c_remove), |
421 | }; | 424 | }; |
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index 3e59189f4137..7baf1b644039 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" : ""); |
@@ -266,8 +266,11 @@ static const struct of_device_id d7s_match[] = { | |||
266 | MODULE_DEVICE_TABLE(of, d7s_match); | 266 | MODULE_DEVICE_TABLE(of, d7s_match); |
267 | 267 | ||
268 | static struct of_platform_driver d7s_driver = { | 268 | static struct of_platform_driver d7s_driver = { |
269 | .name = DRIVER_NAME, | 269 | .driver = { |
270 | .match_table = d7s_match, | 270 | .name = DRIVER_NAME, |
271 | .owner = THIS_MODULE, | ||
272 | .of_match_table = d7s_match, | ||
273 | }, | ||
271 | .probe = d7s_probe, | 274 | .probe = d7s_probe, |
272 | .remove = __devexit_p(d7s_remove), | 275 | .remove = __devexit_p(d7s_remove), |
273 | }; | 276 | }; |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index c6e2eff19409..c8166ecf5276 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; |
@@ -1131,8 +1131,11 @@ static const struct of_device_id envctrl_match[] = { | |||
1131 | MODULE_DEVICE_TABLE(of, envctrl_match); | 1131 | MODULE_DEVICE_TABLE(of, envctrl_match); |
1132 | 1132 | ||
1133 | static struct of_platform_driver envctrl_driver = { | 1133 | static struct of_platform_driver envctrl_driver = { |
1134 | .name = DRIVER_NAME, | 1134 | .driver = { |
1135 | .match_table = envctrl_match, | 1135 | .name = DRIVER_NAME, |
1136 | .owner = THIS_MODULE, | ||
1137 | .of_match_table = envctrl_match, | ||
1138 | }, | ||
1136 | .probe = envctrl_probe, | 1139 | .probe = envctrl_probe, |
1137 | .remove = __devexit_p(envctrl_remove), | 1140 | .remove = __devexit_p(envctrl_remove), |
1138 | }; | 1141 | }; |
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 19f255b97c86..368d66294d83 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
@@ -105,9 +105,9 @@ static ssize_t | |||
105 | flash_read(struct file * file, char __user * buf, | 105 | flash_read(struct file * file, char __user * buf, |
106 | size_t count, loff_t *ppos) | 106 | size_t count, loff_t *ppos) |
107 | { | 107 | { |
108 | unsigned long p = file->f_pos; | 108 | loff_t p = *ppos; |
109 | int i; | 109 | int i; |
110 | 110 | ||
111 | if (count > flash.read_size - p) | 111 | if (count > flash.read_size - p) |
112 | count = flash.read_size - p; | 112 | count = flash.read_size - p; |
113 | 113 | ||
@@ -118,7 +118,7 @@ flash_read(struct file * file, char __user * buf, | |||
118 | buf++; | 118 | buf++; |
119 | } | 119 | } |
120 | 120 | ||
121 | file->f_pos += count; | 121 | *ppos += count; |
122 | return count; | 122 | return count; |
123 | } | 123 | } |
124 | 124 | ||
@@ -162,7 +162,7 @@ static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; | |||
162 | static int __devinit flash_probe(struct of_device *op, | 162 | static 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 | ||
@@ -207,8 +207,11 @@ static const struct of_device_id flash_match[] = { | |||
207 | MODULE_DEVICE_TABLE(of, flash_match); | 207 | MODULE_DEVICE_TABLE(of, flash_match); |
208 | 208 | ||
209 | static struct of_platform_driver flash_driver = { | 209 | static struct of_platform_driver flash_driver = { |
210 | .name = "flash", | 210 | .driver = { |
211 | .match_table = flash_match, | 211 | .name = "flash", |
212 | .owner = THIS_MODULE, | ||
213 | .of_match_table = flash_match, | ||
214 | }, | ||
212 | .probe = flash_probe, | 215 | .probe = flash_probe, |
213 | .remove = __devexit_p(flash_remove), | 216 | .remove = __devexit_p(flash_remove), |
214 | }; | 217 | }; |
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index 2c56fd56ec63..5f253665a1da 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 | ||
@@ -425,8 +425,11 @@ static const struct of_device_id uctrl_match[] = { | |||
425 | MODULE_DEVICE_TABLE(of, uctrl_match); | 425 | MODULE_DEVICE_TABLE(of, uctrl_match); |
426 | 426 | ||
427 | static struct of_platform_driver uctrl_driver = { | 427 | static struct of_platform_driver uctrl_driver = { |
428 | .name = "uctrl", | 428 | .driver = { |
429 | .match_table = uctrl_match, | 429 | .name = "uctrl", |
430 | .owner = THIS_MODULE, | ||
431 | .of_match_table = uctrl_match, | ||
432 | }, | ||
430 | .probe = uctrl_probe, | 433 | .probe = uctrl_probe, |
431 | .remove = __devexit_p(uctrl_remove), | 434 | .remove = __devexit_p(uctrl_remove), |
432 | }; | 435 | }; |