diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
commit | 2dc11581376829303b98eadb2de253bee065a56a (patch) | |
tree | dbce62559c822cd720d1819a50c488bfecdfa945 /drivers/input/serio | |
parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff) |
of/device: Replace struct of_device with struct platform_device
of_device is just an alias for platform_device, so remove it entirely. Also
replace to_of_device() with to_platform_device() and update comment blocks.
This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.
@@
@@
-struct of_device
+struct platform_device
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/i8042-sparcio.h | 8 | ||||
-rw-r--r-- | drivers/input/serio/xilinx_ps2.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index cb2a24b94746..c5cc4508d6df 100644 --- a/drivers/input/serio/i8042-sparcio.h +++ b/drivers/input/serio/i8042-sparcio.h | |||
@@ -49,7 +49,7 @@ static inline void i8042_write_command(int val) | |||
49 | #define OBP_PS2MS_NAME1 "kdmouse" | 49 | #define OBP_PS2MS_NAME1 "kdmouse" |
50 | #define OBP_PS2MS_NAME2 "mouse" | 50 | #define OBP_PS2MS_NAME2 "mouse" |
51 | 51 | ||
52 | static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_device_id *match) | 52 | static int __devinit sparc_i8042_probe(struct platform_device *op, const struct of_device_id *match) |
53 | { | 53 | { |
54 | struct device_node *dp = op->dev.of_node; | 54 | struct device_node *dp = op->dev.of_node; |
55 | 55 | ||
@@ -57,7 +57,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev | |||
57 | while (dp) { | 57 | while (dp) { |
58 | if (!strcmp(dp->name, OBP_PS2KBD_NAME1) || | 58 | if (!strcmp(dp->name, OBP_PS2KBD_NAME1) || |
59 | !strcmp(dp->name, OBP_PS2KBD_NAME2)) { | 59 | !strcmp(dp->name, OBP_PS2KBD_NAME2)) { |
60 | struct of_device *kbd = of_find_device_by_node(dp); | 60 | struct platform_device *kbd = of_find_device_by_node(dp); |
61 | unsigned int irq = kbd->archdata.irqs[0]; | 61 | unsigned int irq = kbd->archdata.irqs[0]; |
62 | if (irq == 0xffffffff) | 62 | if (irq == 0xffffffff) |
63 | irq = op->archdata.irqs[0]; | 63 | irq = op->archdata.irqs[0]; |
@@ -67,7 +67,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev | |||
67 | kbd_res = &kbd->resource[0]; | 67 | kbd_res = &kbd->resource[0]; |
68 | } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) || | 68 | } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) || |
69 | !strcmp(dp->name, OBP_PS2MS_NAME2)) { | 69 | !strcmp(dp->name, OBP_PS2MS_NAME2)) { |
70 | struct of_device *ms = of_find_device_by_node(dp); | 70 | struct platform_device *ms = of_find_device_by_node(dp); |
71 | unsigned int irq = ms->archdata.irqs[0]; | 71 | unsigned int irq = ms->archdata.irqs[0]; |
72 | if (irq == 0xffffffff) | 72 | if (irq == 0xffffffff) |
73 | irq = op->archdata.irqs[0]; | 73 | irq = op->archdata.irqs[0]; |
@@ -80,7 +80,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev | |||
80 | return 0; | 80 | return 0; |
81 | } | 81 | } |
82 | 82 | ||
83 | static int __devexit sparc_i8042_remove(struct of_device *op) | 83 | static int __devexit sparc_i8042_remove(struct platform_device *op) |
84 | { | 84 | { |
85 | of_iounmap(kbd_res, kbd_iobase, 8); | 85 | of_iounmap(kbd_res, kbd_iobase, 8); |
86 | 86 | ||
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index e2c028d2638f..bb14449fb022 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
@@ -232,7 +232,7 @@ static void sxps2_close(struct serio *pserio) | |||
232 | * It returns 0, if the driver is bound to the PS/2 device, or a negative | 232 | * It returns 0, if the driver is bound to the PS/2 device, or a negative |
233 | * value if there is an error. | 233 | * value if there is an error. |
234 | */ | 234 | */ |
235 | static int __devinit xps2_of_probe(struct of_device *ofdev, | 235 | static int __devinit xps2_of_probe(struct platform_device *ofdev, |
236 | const struct of_device_id *match) | 236 | const struct of_device_id *match) |
237 | { | 237 | { |
238 | struct resource r_irq; /* Interrupt resources */ | 238 | struct resource r_irq; /* Interrupt resources */ |
@@ -332,7 +332,7 @@ failed1: | |||
332 | * if the driver module is being unloaded. It frees any resources allocated to | 332 | * if the driver module is being unloaded. It frees any resources allocated to |
333 | * the device. | 333 | * the device. |
334 | */ | 334 | */ |
335 | static int __devexit xps2_of_remove(struct of_device *of_dev) | 335 | static int __devexit xps2_of_remove(struct platform_device *of_dev) |
336 | { | 336 | { |
337 | struct device *dev = &of_dev->dev; | 337 | struct device *dev = &of_dev->dev; |
338 | struct xps2data *drvdata = dev_get_drvdata(dev); | 338 | struct xps2data *drvdata = dev_get_drvdata(dev); |