diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-02-17 04:43:24 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-02-28 15:22:46 -0500 |
commit | 1c48a5c93da63132b92c4bbcd18e690c51539df6 (patch) | |
tree | 746e990ce0f49e48e2cc9d55766485f468ca35f6 /drivers/watchdog | |
parent | 793218dfea146946a076f4fe51e574db61034a3e (diff) |
dt: Eliminate of_platform_{,un}register_driver
Final step to eliminate of_platform_bus_type. They're all just
platform drivers now.
v2: fix type in pasemi_nand.c (thanks to Stephen Rothwell)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/cpwd.c | 9 | ||||
-rw-r--r-- | drivers/watchdog/gef_wdt.c | 9 | ||||
-rw-r--r-- | drivers/watchdog/mpc8xxx_wdt.c | 15 | ||||
-rw-r--r-- | drivers/watchdog/riowd.c | 9 |
4 files changed, 21 insertions, 21 deletions
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index eca855a55c0d..45db1d570df1 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
@@ -528,8 +528,7 @@ static const struct file_operations cpwd_fops = { | |||
528 | .llseek = no_llseek, | 528 | .llseek = no_llseek, |
529 | }; | 529 | }; |
530 | 530 | ||
531 | static int __devinit cpwd_probe(struct platform_device *op, | 531 | static int __devinit cpwd_probe(struct platform_device *op) |
532 | const struct of_device_id *match) | ||
533 | { | 532 | { |
534 | struct device_node *options; | 533 | struct device_node *options; |
535 | const char *str_prop; | 534 | const char *str_prop; |
@@ -678,7 +677,7 @@ static const struct of_device_id cpwd_match[] = { | |||
678 | }; | 677 | }; |
679 | MODULE_DEVICE_TABLE(of, cpwd_match); | 678 | MODULE_DEVICE_TABLE(of, cpwd_match); |
680 | 679 | ||
681 | static struct of_platform_driver cpwd_driver = { | 680 | static struct platform_driver cpwd_driver = { |
682 | .driver = { | 681 | .driver = { |
683 | .name = DRIVER_NAME, | 682 | .name = DRIVER_NAME, |
684 | .owner = THIS_MODULE, | 683 | .owner = THIS_MODULE, |
@@ -690,12 +689,12 @@ static struct of_platform_driver cpwd_driver = { | |||
690 | 689 | ||
691 | static int __init cpwd_init(void) | 690 | static int __init cpwd_init(void) |
692 | { | 691 | { |
693 | return of_register_platform_driver(&cpwd_driver); | 692 | return platform_driver_register(&cpwd_driver); |
694 | } | 693 | } |
695 | 694 | ||
696 | static void __exit cpwd_exit(void) | 695 | static void __exit cpwd_exit(void) |
697 | { | 696 | { |
698 | of_unregister_platform_driver(&cpwd_driver); | 697 | platform_driver_unregister(&cpwd_driver); |
699 | } | 698 | } |
700 | 699 | ||
701 | module_init(cpwd_init); | 700 | module_init(cpwd_init); |
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c index f6bd6f10fcec..29a7cd4b90c8 100644 --- a/drivers/watchdog/gef_wdt.c +++ b/drivers/watchdog/gef_wdt.c | |||
@@ -261,8 +261,7 @@ static struct miscdevice gef_wdt_miscdev = { | |||
261 | }; | 261 | }; |
262 | 262 | ||
263 | 263 | ||
264 | static int __devinit gef_wdt_probe(struct platform_device *dev, | 264 | static int __devinit gef_wdt_probe(struct platform_device *dev) |
265 | const struct of_device_id *match) | ||
266 | { | 265 | { |
267 | int timeout = 10; | 266 | int timeout = 10; |
268 | u32 freq; | 267 | u32 freq; |
@@ -303,7 +302,7 @@ static const struct of_device_id gef_wdt_ids[] = { | |||
303 | {}, | 302 | {}, |
304 | }; | 303 | }; |
305 | 304 | ||
306 | static struct of_platform_driver gef_wdt_driver = { | 305 | static struct platform_driver gef_wdt_driver = { |
307 | .driver = { | 306 | .driver = { |
308 | .name = "gef_wdt", | 307 | .name = "gef_wdt", |
309 | .owner = THIS_MODULE, | 308 | .owner = THIS_MODULE, |
@@ -315,12 +314,12 @@ static struct of_platform_driver gef_wdt_driver = { | |||
315 | static int __init gef_wdt_init(void) | 314 | static int __init gef_wdt_init(void) |
316 | { | 315 | { |
317 | printk(KERN_INFO "GE watchdog driver\n"); | 316 | printk(KERN_INFO "GE watchdog driver\n"); |
318 | return of_register_platform_driver(&gef_wdt_driver); | 317 | return platform_driver_register(&gef_wdt_driver); |
319 | } | 318 | } |
320 | 319 | ||
321 | static void __exit gef_wdt_exit(void) | 320 | static void __exit gef_wdt_exit(void) |
322 | { | 321 | { |
323 | of_unregister_platform_driver(&gef_wdt_driver); | 322 | platform_driver_unregister(&gef_wdt_driver); |
324 | } | 323 | } |
325 | 324 | ||
326 | module_init(gef_wdt_init); | 325 | module_init(gef_wdt_init); |
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c index 8fa213cdb499..ea438ad53055 100644 --- a/drivers/watchdog/mpc8xxx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c | |||
@@ -185,15 +185,18 @@ static struct miscdevice mpc8xxx_wdt_miscdev = { | |||
185 | .fops = &mpc8xxx_wdt_fops, | 185 | .fops = &mpc8xxx_wdt_fops, |
186 | }; | 186 | }; |
187 | 187 | ||
188 | static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev, | 188 | static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev) |
189 | const struct of_device_id *match) | ||
190 | { | 189 | { |
191 | int ret; | 190 | int ret; |
192 | struct device_node *np = ofdev->dev.of_node; | 191 | struct device_node *np = ofdev->dev.of_node; |
193 | struct mpc8xxx_wdt_type *wdt_type = match->data; | 192 | struct mpc8xxx_wdt_type *wdt_type; |
194 | u32 freq = fsl_get_sys_freq(); | 193 | u32 freq = fsl_get_sys_freq(); |
195 | bool enabled; | 194 | bool enabled; |
196 | 195 | ||
196 | if (!ofdev->dev.of_match) | ||
197 | return -EINVAL; | ||
198 | wdt_type = match->data; | ||
199 | |||
197 | if (!freq || freq == -1) | 200 | if (!freq || freq == -1) |
198 | return -EINVAL; | 201 | return -EINVAL; |
199 | 202 | ||
@@ -272,7 +275,7 @@ static const struct of_device_id mpc8xxx_wdt_match[] = { | |||
272 | }; | 275 | }; |
273 | MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match); | 276 | MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match); |
274 | 277 | ||
275 | static struct of_platform_driver mpc8xxx_wdt_driver = { | 278 | static struct platform_driver mpc8xxx_wdt_driver = { |
276 | .probe = mpc8xxx_wdt_probe, | 279 | .probe = mpc8xxx_wdt_probe, |
277 | .remove = __devexit_p(mpc8xxx_wdt_remove), | 280 | .remove = __devexit_p(mpc8xxx_wdt_remove), |
278 | .driver = { | 281 | .driver = { |
@@ -308,13 +311,13 @@ module_init(mpc8xxx_wdt_init_late); | |||
308 | 311 | ||
309 | static int __init mpc8xxx_wdt_init(void) | 312 | static int __init mpc8xxx_wdt_init(void) |
310 | { | 313 | { |
311 | return of_register_platform_driver(&mpc8xxx_wdt_driver); | 314 | return platform_driver_register(&mpc8xxx_wdt_driver); |
312 | } | 315 | } |
313 | arch_initcall(mpc8xxx_wdt_init); | 316 | arch_initcall(mpc8xxx_wdt_init); |
314 | 317 | ||
315 | static void __exit mpc8xxx_wdt_exit(void) | 318 | static void __exit mpc8xxx_wdt_exit(void) |
316 | { | 319 | { |
317 | of_unregister_platform_driver(&mpc8xxx_wdt_driver); | 320 | platform_driver_unregister(&mpc8xxx_wdt_driver); |
318 | } | 321 | } |
319 | module_exit(mpc8xxx_wdt_exit); | 322 | module_exit(mpc8xxx_wdt_exit); |
320 | 323 | ||
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c index 3faee1ae64bd..109b533896b7 100644 --- a/drivers/watchdog/riowd.c +++ b/drivers/watchdog/riowd.c | |||
@@ -172,8 +172,7 @@ static struct miscdevice riowd_miscdev = { | |||
172 | .fops = &riowd_fops | 172 | .fops = &riowd_fops |
173 | }; | 173 | }; |
174 | 174 | ||
175 | static int __devinit riowd_probe(struct platform_device *op, | 175 | static int __devinit riowd_probe(struct platform_device *op) |
176 | const struct of_device_id *match) | ||
177 | { | 176 | { |
178 | struct riowd *p; | 177 | struct riowd *p; |
179 | int err = -EINVAL; | 178 | int err = -EINVAL; |
@@ -238,7 +237,7 @@ static const struct of_device_id riowd_match[] = { | |||
238 | }; | 237 | }; |
239 | MODULE_DEVICE_TABLE(of, riowd_match); | 238 | MODULE_DEVICE_TABLE(of, riowd_match); |
240 | 239 | ||
241 | static struct of_platform_driver riowd_driver = { | 240 | static struct platform_driver riowd_driver = { |
242 | .driver = { | 241 | .driver = { |
243 | .name = DRIVER_NAME, | 242 | .name = DRIVER_NAME, |
244 | .owner = THIS_MODULE, | 243 | .owner = THIS_MODULE, |
@@ -250,12 +249,12 @@ static struct of_platform_driver riowd_driver = { | |||
250 | 249 | ||
251 | static int __init riowd_init(void) | 250 | static int __init riowd_init(void) |
252 | { | 251 | { |
253 | return of_register_platform_driver(&riowd_driver); | 252 | return platform_driver_register(&riowd_driver); |
254 | } | 253 | } |
255 | 254 | ||
256 | static void __exit riowd_exit(void) | 255 | static void __exit riowd_exit(void) |
257 | { | 256 | { |
258 | of_unregister_platform_driver(&riowd_driver); | 257 | platform_driver_unregister(&riowd_driver); |
259 | } | 258 | } |
260 | 259 | ||
261 | module_init(riowd_init); | 260 | module_init(riowd_init); |