diff options
Diffstat (limited to 'drivers/sbus/char/bbc_i2c.c')
| -rw-r--r-- | drivers/sbus/char/bbc_i2c.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 3e89c313e98d..614a5e114a19 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c | |||
| @@ -51,7 +51,7 @@ | |||
| 51 | * The second controller also connects to the smartcard reader, if present. | 51 | * The second controller also connects to the smartcard reader, if present. |
| 52 | */ | 52 | */ |
| 53 | 53 | ||
| 54 | static void set_device_claimage(struct bbc_i2c_bus *bp, struct of_device *op, int val) | 54 | static void set_device_claimage(struct bbc_i2c_bus *bp, struct platform_device *op, int val) |
| 55 | { | 55 | { |
| 56 | int i; | 56 | int i; |
| 57 | 57 | ||
| @@ -66,9 +66,9 @@ static void set_device_claimage(struct bbc_i2c_bus *bp, struct of_device *op, in | |||
| 66 | #define claim_device(BP,ECHILD) set_device_claimage(BP,ECHILD,1) | 66 | #define claim_device(BP,ECHILD) set_device_claimage(BP,ECHILD,1) |
| 67 | #define release_device(BP,ECHILD) set_device_claimage(BP,ECHILD,0) | 67 | #define release_device(BP,ECHILD) set_device_claimage(BP,ECHILD,0) |
| 68 | 68 | ||
| 69 | struct of_device *bbc_i2c_getdev(struct bbc_i2c_bus *bp, int index) | 69 | struct platform_device *bbc_i2c_getdev(struct bbc_i2c_bus *bp, int index) |
| 70 | { | 70 | { |
| 71 | struct of_device *op = NULL; | 71 | struct platform_device *op = NULL; |
| 72 | int curidx = 0, i; | 72 | int curidx = 0, i; |
| 73 | 73 | ||
| 74 | for (i = 0; i < NUM_CHILDREN; i++) { | 74 | for (i = 0; i < NUM_CHILDREN; i++) { |
| @@ -86,7 +86,7 @@ out: | |||
| 86 | return NULL; | 86 | return NULL; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *op) | 89 | struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *op) |
| 90 | { | 90 | { |
| 91 | struct bbc_i2c_client *client; | 91 | struct bbc_i2c_client *client; |
| 92 | const u32 *reg; | 92 | const u32 *reg; |
| @@ -114,7 +114,7 @@ struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device * | |||
| 114 | void bbc_i2c_detach(struct bbc_i2c_client *client) | 114 | void bbc_i2c_detach(struct bbc_i2c_client *client) |
| 115 | { | 115 | { |
| 116 | struct bbc_i2c_bus *bp = client->bp; | 116 | struct bbc_i2c_bus *bp = client->bp; |
| 117 | struct of_device *op = client->op; | 117 | struct platform_device *op = client->op; |
| 118 | 118 | ||
| 119 | release_device(bp, op); | 119 | release_device(bp, op); |
| 120 | kfree(client); | 120 | kfree(client); |
| @@ -297,7 +297,7 @@ static void __init reset_one_i2c(struct bbc_i2c_bus *bp) | |||
| 297 | writeb(I2C_PCF_IDLE, bp->i2c_control_regs + 0x0); | 297 | writeb(I2C_PCF_IDLE, bp->i2c_control_regs + 0x0); |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int index) | 300 | static struct bbc_i2c_bus * __init attach_one_i2c(struct platform_device *op, int index) |
| 301 | { | 301 | { |
| 302 | struct bbc_i2c_bus *bp; | 302 | struct bbc_i2c_bus *bp; |
| 303 | struct device_node *dp; | 303 | struct device_node *dp; |
| @@ -330,7 +330,7 @@ static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int inde | |||
| 330 | for (dp = op->dev.of_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 platform_device *child_op; |
| 334 | 334 | ||
| 335 | child_op = of_find_device_by_node(dp); | 335 | child_op = of_find_device_by_node(dp); |
| 336 | bp->devs[entry].device = child_op; | 336 | bp->devs[entry].device = child_op; |
| @@ -361,7 +361,7 @@ fail: | |||
| 361 | extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); | 361 | extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); |
| 362 | extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); | 362 | extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); |
| 363 | 363 | ||
| 364 | static int __devinit bbc_i2c_probe(struct of_device *op, | 364 | static int __devinit bbc_i2c_probe(struct platform_device *op, |
| 365 | const struct of_device_id *match) | 365 | const struct of_device_id *match) |
| 366 | { | 366 | { |
| 367 | struct bbc_i2c_bus *bp; | 367 | struct bbc_i2c_bus *bp; |
| @@ -386,7 +386,7 @@ static int __devinit bbc_i2c_probe(struct of_device *op, | |||
| 386 | return err; | 386 | return err; |
| 387 | } | 387 | } |
| 388 | 388 | ||
| 389 | static int __devexit bbc_i2c_remove(struct of_device *op) | 389 | static int __devexit bbc_i2c_remove(struct platform_device *op) |
| 390 | { | 390 | { |
| 391 | struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev); | 391 | struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev); |
| 392 | 392 | ||
