aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-02-17 04:43:24 -0500
committerGrant Likely <grant.likely@secretlab.ca>2011-02-28 15:22:46 -0500
commit1c48a5c93da63132b92c4bbcd18e690c51539df6 (patch)
tree746e990ce0f49e48e2cc9d55766485f468ca35f6 /drivers/watchdog
parent793218dfea146946a076f4fe51e574db61034a3e (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.c9
-rw-r--r--drivers/watchdog/gef_wdt.c9
-rw-r--r--drivers/watchdog/mpc8xxx_wdt.c15
-rw-r--r--drivers/watchdog/riowd.c9
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
531static int __devinit cpwd_probe(struct platform_device *op, 531static 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};
679MODULE_DEVICE_TABLE(of, cpwd_match); 678MODULE_DEVICE_TABLE(of, cpwd_match);
680 679
681static struct of_platform_driver cpwd_driver = { 680static 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
691static int __init cpwd_init(void) 690static 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
696static void __exit cpwd_exit(void) 695static void __exit cpwd_exit(void)
697{ 696{
698 of_unregister_platform_driver(&cpwd_driver); 697 platform_driver_unregister(&cpwd_driver);
699} 698}
700 699
701module_init(cpwd_init); 700module_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
264static int __devinit gef_wdt_probe(struct platform_device *dev, 264static 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
306static struct of_platform_driver gef_wdt_driver = { 305static 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 = {
315static int __init gef_wdt_init(void) 314static 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
321static void __exit gef_wdt_exit(void) 320static 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
326module_init(gef_wdt_init); 325module_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
188static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev, 188static 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};
273MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match); 276MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match);
274 277
275static struct of_platform_driver mpc8xxx_wdt_driver = { 278static 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
309static int __init mpc8xxx_wdt_init(void) 312static 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}
313arch_initcall(mpc8xxx_wdt_init); 316arch_initcall(mpc8xxx_wdt_init);
314 317
315static void __exit mpc8xxx_wdt_exit(void) 318static 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}
319module_exit(mpc8xxx_wdt_exit); 322module_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
175static int __devinit riowd_probe(struct platform_device *op, 175static 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};
239MODULE_DEVICE_TABLE(of, riowd_match); 238MODULE_DEVICE_TABLE(of, riowd_match);
240 239
241static struct of_platform_driver riowd_driver = { 240static 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
251static int __init riowd_init(void) 250static 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
256static void __exit riowd_exit(void) 255static void __exit riowd_exit(void)
257{ 256{
258 of_unregister_platform_driver(&riowd_driver); 257 platform_driver_unregister(&riowd_driver);
259} 258}
260 259
261module_init(riowd_init); 260module_init(riowd_init);