diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 20:28:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 20:28:10 -0400 |
commit | 4c5811bf463b0ef82fabbd1708f8bb2d753aeb18 (patch) | |
tree | ff37d31217c3804ca05de21a55a9b5ca1ca818b2 /drivers/input/serio | |
parent | f74b9444192c60603020c61d7915b72893137edc (diff) | |
parent | 9f15444fefdb33509132ff5c9be60cb315c44cb2 (diff) |
Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits)
tty: serial: altera_jtaguart: Add device tree support
tty: serial: altera_uart: Add devicetree support
dt: eliminate of_platform_driver shim code
dt: Eliminate of_platform_{,un}register_driver
dt/serial: Eliminate users of of_platform_{,un}register_driver
dt/usb: Eliminate users of of_platform_{,un}register_driver
dt/video: Eliminate users of of_platform_{,un}register_driver
dt/net: Eliminate users of of_platform_{,un}register_driver
dt/sound: Eliminate users of of_platform_{,un}register_driver
dt/spi: Eliminate users of of_platform_{,un}register_driver
dt: uartlite: merge platform and of_platform driver bindings
dt: xilinx_hwicap: merge platform and of_platform driver bindings
ipmi: convert OF driver to platform driver
leds/leds-gpio: merge platform_driver with of_platform_driver
dt/sparc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: move of_bus_type infrastructure to ibmebus
drivercore/dt: add a match table pointer to struct device
dt: Typo fix.
altera_ps2: Add devicetree support
...
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/altera_ps2.c | 15 | ||||
-rw-r--r-- | drivers/input/serio/i8042-sparcio.h | 8 | ||||
-rw-r--r-- | drivers/input/serio/xilinx_ps2.c | 9 |
3 files changed, 21 insertions, 11 deletions
diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c index 7998560a1904..d363dc4571a3 100644 --- a/drivers/input/serio/altera_ps2.c +++ b/drivers/input/serio/altera_ps2.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/of.h> | ||
22 | 23 | ||
23 | #define DRV_NAME "altera_ps2" | 24 | #define DRV_NAME "altera_ps2" |
24 | 25 | ||
@@ -173,6 +174,16 @@ static int __devexit altera_ps2_remove(struct platform_device *pdev) | |||
173 | return 0; | 174 | return 0; |
174 | } | 175 | } |
175 | 176 | ||
177 | #ifdef CONFIG_OF | ||
178 | static const struct of_device_id altera_ps2_match[] = { | ||
179 | { .compatible = "ALTR,ps2-1.0", }, | ||
180 | {}, | ||
181 | }; | ||
182 | MODULE_DEVICE_TABLE(of, altera_ps2_match); | ||
183 | #else /* CONFIG_OF */ | ||
184 | #define altera_ps2_match NULL | ||
185 | #endif /* CONFIG_OF */ | ||
186 | |||
176 | /* | 187 | /* |
177 | * Our device driver structure | 188 | * Our device driver structure |
178 | */ | 189 | */ |
@@ -182,6 +193,7 @@ static struct platform_driver altera_ps2_driver = { | |||
182 | .driver = { | 193 | .driver = { |
183 | .name = DRV_NAME, | 194 | .name = DRV_NAME, |
184 | .owner = THIS_MODULE, | 195 | .owner = THIS_MODULE, |
196 | .of_match_table = altera_ps2_match, | ||
185 | }, | 197 | }, |
186 | }; | 198 | }; |
187 | 199 | ||
@@ -189,13 +201,12 @@ static int __init altera_ps2_init(void) | |||
189 | { | 201 | { |
190 | return platform_driver_register(&altera_ps2_driver); | 202 | return platform_driver_register(&altera_ps2_driver); |
191 | } | 203 | } |
204 | module_init(altera_ps2_init); | ||
192 | 205 | ||
193 | static void __exit altera_ps2_exit(void) | 206 | static void __exit altera_ps2_exit(void) |
194 | { | 207 | { |
195 | platform_driver_unregister(&altera_ps2_driver); | 208 | platform_driver_unregister(&altera_ps2_driver); |
196 | } | 209 | } |
197 | |||
198 | module_init(altera_ps2_init); | ||
199 | module_exit(altera_ps2_exit); | 210 | module_exit(altera_ps2_exit); |
200 | 211 | ||
201 | MODULE_DESCRIPTION("Altera University Program PS2 controller driver"); | 212 | MODULE_DESCRIPTION("Altera University Program PS2 controller driver"); |
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index c5cc4508d6df..395a9af3adcd 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 platform_device *op, const struct of_device_id *match) | 52 | static int __devinit sparc_i8042_probe(struct platform_device *op) |
53 | { | 53 | { |
54 | struct device_node *dp = op->dev.of_node; | 54 | struct device_node *dp = op->dev.of_node; |
55 | 55 | ||
@@ -95,7 +95,7 @@ static const struct of_device_id sparc_i8042_match[] = { | |||
95 | }; | 95 | }; |
96 | MODULE_DEVICE_TABLE(of, sparc_i8042_match); | 96 | MODULE_DEVICE_TABLE(of, sparc_i8042_match); |
97 | 97 | ||
98 | static struct of_platform_driver sparc_i8042_driver = { | 98 | static struct platform_driver sparc_i8042_driver = { |
99 | .driver = { | 99 | .driver = { |
100 | .name = "i8042", | 100 | .name = "i8042", |
101 | .owner = THIS_MODULE, | 101 | .owner = THIS_MODULE, |
@@ -116,7 +116,7 @@ static int __init i8042_platform_init(void) | |||
116 | if (!kbd_iobase) | 116 | if (!kbd_iobase) |
117 | return -ENODEV; | 117 | return -ENODEV; |
118 | } else { | 118 | } else { |
119 | int err = of_register_platform_driver(&sparc_i8042_driver); | 119 | int err = platform_driver_register(&sparc_i8042_driver); |
120 | if (err) | 120 | if (err) |
121 | return err; | 121 | return err; |
122 | 122 | ||
@@ -140,7 +140,7 @@ static inline void i8042_platform_exit(void) | |||
140 | struct device_node *root = of_find_node_by_path("/"); | 140 | struct device_node *root = of_find_node_by_path("/"); |
141 | 141 | ||
142 | if (strcmp(root->name, "SUNW,JavaStation-1")) | 142 | if (strcmp(root->name, "SUNW,JavaStation-1")) |
143 | of_unregister_platform_driver(&sparc_i8042_driver); | 143 | platform_driver_unregister(&sparc_i8042_driver); |
144 | } | 144 | } |
145 | 145 | ||
146 | #else /* !CONFIG_PCI */ | 146 | #else /* !CONFIG_PCI */ |
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index bb14449fb022..7540bafc95cf 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
@@ -232,8 +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 platform_device *ofdev, | 235 | static int __devinit xps2_of_probe(struct platform_device *ofdev) |
236 | const struct of_device_id *match) | ||
237 | { | 236 | { |
238 | struct resource r_irq; /* Interrupt resources */ | 237 | struct resource r_irq; /* Interrupt resources */ |
239 | struct resource r_mem; /* IO mem resources */ | 238 | struct resource r_mem; /* IO mem resources */ |
@@ -361,7 +360,7 @@ static const struct of_device_id xps2_of_match[] __devinitconst = { | |||
361 | }; | 360 | }; |
362 | MODULE_DEVICE_TABLE(of, xps2_of_match); | 361 | MODULE_DEVICE_TABLE(of, xps2_of_match); |
363 | 362 | ||
364 | static struct of_platform_driver xps2_of_driver = { | 363 | static struct platform_driver xps2_of_driver = { |
365 | .driver = { | 364 | .driver = { |
366 | .name = DRIVER_NAME, | 365 | .name = DRIVER_NAME, |
367 | .owner = THIS_MODULE, | 366 | .owner = THIS_MODULE, |
@@ -373,12 +372,12 @@ static struct of_platform_driver xps2_of_driver = { | |||
373 | 372 | ||
374 | static int __init xps2_init(void) | 373 | static int __init xps2_init(void) |
375 | { | 374 | { |
376 | return of_register_platform_driver(&xps2_of_driver); | 375 | return platform_driver_register(&xps2_of_driver); |
377 | } | 376 | } |
378 | 377 | ||
379 | static void __exit xps2_cleanup(void) | 378 | static void __exit xps2_cleanup(void) |
380 | { | 379 | { |
381 | of_unregister_platform_driver(&xps2_of_driver); | 380 | platform_driver_unregister(&xps2_of_driver); |
382 | } | 381 | } |
383 | 382 | ||
384 | module_init(xps2_init); | 383 | module_init(xps2_init); |