aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/hw_random/n2-drv.c16
-rw-r--r--drivers/crypto/n2_core.c20
-rw-r--r--drivers/hwmon/ultra45_env.c9
-rw-r--r--drivers/input/misc/sparcspkr.c22
-rw-r--r--drivers/input/serio/i8042-sparcio.h8
-rw-r--r--drivers/parport/parport_sunbpp.c8
-rw-r--r--drivers/sbus/char/bbc_i2c.c9
-rw-r--r--drivers/sbus/char/display7seg.c9
-rw-r--r--drivers/sbus/char/envctrl.c9
-rw-r--r--drivers/sbus/char/flash.c9
-rw-r--r--drivers/sbus/char/uctrl.c9
-rw-r--r--drivers/scsi/qlogicpti.c14
-rw-r--r--drivers/scsi/sun_esp.c8
13 files changed, 73 insertions, 77 deletions
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c
index a3f5e381e746..43ac61978d8b 100644
--- a/drivers/char/hw_random/n2-drv.c
+++ b/drivers/char/hw_random/n2-drv.c
@@ -619,15 +619,17 @@ static void __devinit n2rng_driver_version(void)
619 pr_info("%s", version); 619 pr_info("%s", version);
620} 620}
621 621
622static int __devinit n2rng_probe(struct platform_device *op, 622static int __devinit n2rng_probe(struct platform_device *op)
623 const struct of_device_id *match)
624{ 623{
625 int victoria_falls = (match->data != NULL); 624 int victoria_falls;
626 int err = -ENOMEM; 625 int err = -ENOMEM;
627 struct n2rng *np; 626 struct n2rng *np;
628 627
629 n2rng_driver_version(); 628 if (!op->dev.of_match)
629 return -EINVAL;
630 victoria_falls = (op->dev.of_match->data != NULL);
630 631
632 n2rng_driver_version();
631 np = kzalloc(sizeof(*np), GFP_KERNEL); 633 np = kzalloc(sizeof(*np), GFP_KERNEL);
632 if (!np) 634 if (!np)
633 goto out; 635 goto out;
@@ -750,7 +752,7 @@ static const struct of_device_id n2rng_match[] = {
750}; 752};
751MODULE_DEVICE_TABLE(of, n2rng_match); 753MODULE_DEVICE_TABLE(of, n2rng_match);
752 754
753static struct of_platform_driver n2rng_driver = { 755static struct platform_driver n2rng_driver = {
754 .driver = { 756 .driver = {
755 .name = "n2rng", 757 .name = "n2rng",
756 .owner = THIS_MODULE, 758 .owner = THIS_MODULE,
@@ -762,12 +764,12 @@ static struct of_platform_driver n2rng_driver = {
762 764
763static int __init n2rng_init(void) 765static int __init n2rng_init(void)
764{ 766{
765 return of_register_platform_driver(&n2rng_driver); 767 return platform_driver_register(&n2rng_driver);
766} 768}
767 769
768static void __exit n2rng_exit(void) 770static void __exit n2rng_exit(void)
769{ 771{
770 of_unregister_platform_driver(&n2rng_driver); 772 platform_driver_unregister(&n2rng_driver);
771} 773}
772 774
773module_init(n2rng_init); 775module_init(n2rng_init);
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index 80dc094e78c6..2e5b2044c96f 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -2004,8 +2004,7 @@ static void __devinit n2_spu_driver_version(void)
2004 pr_info("%s", version); 2004 pr_info("%s", version);
2005} 2005}
2006 2006
2007static int __devinit n2_crypto_probe(struct platform_device *dev, 2007static int __devinit n2_crypto_probe(struct platform_device *dev)
2008 const struct of_device_id *match)
2009{ 2008{
2010 struct mdesc_handle *mdesc; 2009 struct mdesc_handle *mdesc;
2011 const char *full_name; 2010 const char *full_name;
@@ -2116,8 +2115,7 @@ static void free_ncp(struct n2_mau *mp)
2116 kfree(mp); 2115 kfree(mp);
2117} 2116}
2118 2117
2119static int __devinit n2_mau_probe(struct platform_device *dev, 2118static int __devinit n2_mau_probe(struct platform_device *dev)
2120 const struct of_device_id *match)
2121{ 2119{
2122 struct mdesc_handle *mdesc; 2120 struct mdesc_handle *mdesc;
2123 const char *full_name; 2121 const char *full_name;
@@ -2211,7 +2209,7 @@ static struct of_device_id n2_crypto_match[] = {
2211 2209
2212MODULE_DEVICE_TABLE(of, n2_crypto_match); 2210MODULE_DEVICE_TABLE(of, n2_crypto_match);
2213 2211
2214static struct of_platform_driver n2_crypto_driver = { 2212static struct platform_driver n2_crypto_driver = {
2215 .driver = { 2213 .driver = {
2216 .name = "n2cp", 2214 .name = "n2cp",
2217 .owner = THIS_MODULE, 2215 .owner = THIS_MODULE,
@@ -2235,7 +2233,7 @@ static struct of_device_id n2_mau_match[] = {
2235 2233
2236MODULE_DEVICE_TABLE(of, n2_mau_match); 2234MODULE_DEVICE_TABLE(of, n2_mau_match);
2237 2235
2238static struct of_platform_driver n2_mau_driver = { 2236static struct platform_driver n2_mau_driver = {
2239 .driver = { 2237 .driver = {
2240 .name = "ncp", 2238 .name = "ncp",
2241 .owner = THIS_MODULE, 2239 .owner = THIS_MODULE,
@@ -2247,20 +2245,20 @@ static struct of_platform_driver n2_mau_driver = {
2247 2245
2248static int __init n2_init(void) 2246static int __init n2_init(void)
2249{ 2247{
2250 int err = of_register_platform_driver(&n2_crypto_driver); 2248 int err = platform_driver_register(&n2_crypto_driver);
2251 2249
2252 if (!err) { 2250 if (!err) {
2253 err = of_register_platform_driver(&n2_mau_driver); 2251 err = platform_driver_register(&n2_mau_driver);
2254 if (err) 2252 if (err)
2255 of_unregister_platform_driver(&n2_crypto_driver); 2253 platform_driver_unregister(&n2_crypto_driver);
2256 } 2254 }
2257 return err; 2255 return err;
2258} 2256}
2259 2257
2260static void __exit n2_exit(void) 2258static void __exit n2_exit(void)
2261{ 2259{
2262 of_unregister_platform_driver(&n2_mau_driver); 2260 platform_driver_unregister(&n2_mau_driver);
2263 of_unregister_platform_driver(&n2_crypto_driver); 2261 platform_driver_unregister(&n2_crypto_driver);
2264} 2262}
2265 2263
2266module_init(n2_init); 2264module_init(n2_init);
diff --git a/drivers/hwmon/ultra45_env.c b/drivers/hwmon/ultra45_env.c
index d863e13a50b8..1f36c635d933 100644
--- a/drivers/hwmon/ultra45_env.c
+++ b/drivers/hwmon/ultra45_env.c
@@ -234,8 +234,7 @@ static const struct attribute_group env_group = {
234 .attrs = env_attributes, 234 .attrs = env_attributes,
235}; 235};
236 236
237static int __devinit env_probe(struct platform_device *op, 237static int __devinit env_probe(struct platform_device *op)
238 const struct of_device_id *match)
239{ 238{
240 struct env *p = kzalloc(sizeof(*p), GFP_KERNEL); 239 struct env *p = kzalloc(sizeof(*p), GFP_KERNEL);
241 int err = -ENOMEM; 240 int err = -ENOMEM;
@@ -299,7 +298,7 @@ static const struct of_device_id env_match[] = {
299}; 298};
300MODULE_DEVICE_TABLE(of, env_match); 299MODULE_DEVICE_TABLE(of, env_match);
301 300
302static struct of_platform_driver env_driver = { 301static struct platform_driver env_driver = {
303 .driver = { 302 .driver = {
304 .name = "ultra45_env", 303 .name = "ultra45_env",
305 .owner = THIS_MODULE, 304 .owner = THIS_MODULE,
@@ -311,12 +310,12 @@ static struct of_platform_driver env_driver = {
311 310
312static int __init env_init(void) 311static int __init env_init(void)
313{ 312{
314 return of_register_platform_driver(&env_driver); 313 return platform_driver_register(&env_driver);
315} 314}
316 315
317static void __exit env_exit(void) 316static void __exit env_exit(void)
318{ 317{
319 of_unregister_platform_driver(&env_driver); 318 platform_driver_unregister(&env_driver);
320} 319}
321 320
322module_init(env_init); 321module_init(env_init);
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
index 8e130bf7d32b..0122f5351577 100644
--- a/drivers/input/misc/sparcspkr.c
+++ b/drivers/input/misc/sparcspkr.c
@@ -173,18 +173,16 @@ static int __devinit sparcspkr_probe(struct device *dev)
173 return 0; 173 return 0;
174} 174}
175 175
176static int sparcspkr_shutdown(struct platform_device *dev) 176static void sparcspkr_shutdown(struct platform_device *dev)
177{ 177{
178 struct sparcspkr_state *state = dev_get_drvdata(&dev->dev); 178 struct sparcspkr_state *state = dev_get_drvdata(&dev->dev);
179 struct input_dev *input_dev = state->input_dev; 179 struct input_dev *input_dev = state->input_dev;
180 180
181 /* turn off the speaker */ 181 /* turn off the speaker */
182 state->event(input_dev, EV_SND, SND_BELL, 0); 182 state->event(input_dev, EV_SND, SND_BELL, 0);
183
184 return 0;
185} 183}
186 184
187static int __devinit bbc_beep_probe(struct platform_device *op, const struct of_device_id *match) 185static int __devinit bbc_beep_probe(struct platform_device *op)
188{ 186{
189 struct sparcspkr_state *state; 187 struct sparcspkr_state *state;
190 struct bbc_beep_info *info; 188 struct bbc_beep_info *info;
@@ -258,7 +256,7 @@ static const struct of_device_id bbc_beep_match[] = {
258 {}, 256 {},
259}; 257};
260 258
261static struct of_platform_driver bbc_beep_driver = { 259static struct platform_driver bbc_beep_driver = {
262 .driver = { 260 .driver = {
263 .name = "bbcbeep", 261 .name = "bbcbeep",
264 .owner = THIS_MODULE, 262 .owner = THIS_MODULE,
@@ -269,7 +267,7 @@ static struct of_platform_driver bbc_beep_driver = {
269 .shutdown = sparcspkr_shutdown, 267 .shutdown = sparcspkr_shutdown,
270}; 268};
271 269
272static int __devinit grover_beep_probe(struct platform_device *op, const struct of_device_id *match) 270static int __devinit grover_beep_probe(struct platform_device *op)
273{ 271{
274 struct sparcspkr_state *state; 272 struct sparcspkr_state *state;
275 struct grover_beep_info *info; 273 struct grover_beep_info *info;
@@ -340,7 +338,7 @@ static const struct of_device_id grover_beep_match[] = {
340 {}, 338 {},
341}; 339};
342 340
343static struct of_platform_driver grover_beep_driver = { 341static struct platform_driver grover_beep_driver = {
344 .driver = { 342 .driver = {
345 .name = "groverbeep", 343 .name = "groverbeep",
346 .owner = THIS_MODULE, 344 .owner = THIS_MODULE,
@@ -353,12 +351,12 @@ static struct of_platform_driver grover_beep_driver = {
353 351
354static int __init sparcspkr_init(void) 352static int __init sparcspkr_init(void)
355{ 353{
356 int err = of_register_platform_driver(&bbc_beep_driver); 354 int err = platform_driver_register(&bbc_beep_driver);
357 355
358 if (!err) { 356 if (!err) {
359 err = of_register_platform_driver(&grover_beep_driver); 357 err = platform_driver_register(&grover_beep_driver);
360 if (err) 358 if (err)
361 of_unregister_platform_driver(&bbc_beep_driver); 359 platform_driver_unregister(&bbc_beep_driver);
362 } 360 }
363 361
364 return err; 362 return err;
@@ -366,8 +364,8 @@ static int __init sparcspkr_init(void)
366 364
367static void __exit sparcspkr_exit(void) 365static void __exit sparcspkr_exit(void)
368{ 366{
369 of_unregister_platform_driver(&bbc_beep_driver); 367 platform_driver_unregister(&bbc_beep_driver);
370 of_unregister_platform_driver(&grover_beep_driver); 368 platform_driver_unregister(&grover_beep_driver);
371} 369}
372 370
373module_init(sparcspkr_init); 371module_init(sparcspkr_init);
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
52static int __devinit sparc_i8042_probe(struct platform_device *op, const struct of_device_id *match) 52static 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};
96MODULE_DEVICE_TABLE(of, sparc_i8042_match); 96MODULE_DEVICE_TABLE(of, sparc_i8042_match);
97 97
98static struct of_platform_driver sparc_i8042_driver = { 98static 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/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c
index 55ba118f1cf1..910c5a26e347 100644
--- a/drivers/parport/parport_sunbpp.c
+++ b/drivers/parport/parport_sunbpp.c
@@ -286,7 +286,7 @@ static struct parport_operations parport_sunbpp_ops =
286 .owner = THIS_MODULE, 286 .owner = THIS_MODULE,
287}; 287};
288 288
289static int __devinit bpp_probe(struct platform_device *op, const struct of_device_id *match) 289static int __devinit bpp_probe(struct platform_device *op)
290{ 290{
291 struct parport_operations *ops; 291 struct parport_operations *ops;
292 struct bpp_regs __iomem *regs; 292 struct bpp_regs __iomem *regs;
@@ -381,7 +381,7 @@ static const struct of_device_id bpp_match[] = {
381 381
382MODULE_DEVICE_TABLE(of, bpp_match); 382MODULE_DEVICE_TABLE(of, bpp_match);
383 383
384static struct of_platform_driver bpp_sbus_driver = { 384static struct platform_driver bpp_sbus_driver = {
385 .driver = { 385 .driver = {
386 .name = "bpp", 386 .name = "bpp",
387 .owner = THIS_MODULE, 387 .owner = THIS_MODULE,
@@ -393,12 +393,12 @@ static struct of_platform_driver bpp_sbus_driver = {
393 393
394static int __init parport_sunbpp_init(void) 394static int __init parport_sunbpp_init(void)
395{ 395{
396 return of_register_platform_driver(&bpp_sbus_driver); 396 return platform_driver_register(&bpp_sbus_driver);
397} 397}
398 398
399static void __exit parport_sunbpp_exit(void) 399static void __exit parport_sunbpp_exit(void)
400{ 400{
401 of_unregister_platform_driver(&bpp_sbus_driver); 401 platform_driver_unregister(&bpp_sbus_driver);
402} 402}
403 403
404MODULE_AUTHOR("Derrick J Brashear"); 404MODULE_AUTHOR("Derrick J Brashear");
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index 614a5e114a19..5f94d22c491e 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -361,8 +361,7 @@ fail:
361extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); 361extern int bbc_envctrl_init(struct bbc_i2c_bus *bp);
362extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); 362extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp);
363 363
364static int __devinit bbc_i2c_probe(struct platform_device *op, 364static int __devinit bbc_i2c_probe(struct platform_device *op)
365 const struct of_device_id *match)
366{ 365{
367 struct bbc_i2c_bus *bp; 366 struct bbc_i2c_bus *bp;
368 int err, index = 0; 367 int err, index = 0;
@@ -413,7 +412,7 @@ static const struct of_device_id bbc_i2c_match[] = {
413}; 412};
414MODULE_DEVICE_TABLE(of, bbc_i2c_match); 413MODULE_DEVICE_TABLE(of, bbc_i2c_match);
415 414
416static struct of_platform_driver bbc_i2c_driver = { 415static struct platform_driver bbc_i2c_driver = {
417 .driver = { 416 .driver = {
418 .name = "bbc_i2c", 417 .name = "bbc_i2c",
419 .owner = THIS_MODULE, 418 .owner = THIS_MODULE,
@@ -425,12 +424,12 @@ static struct of_platform_driver bbc_i2c_driver = {
425 424
426static int __init bbc_i2c_init(void) 425static int __init bbc_i2c_init(void)
427{ 426{
428 return of_register_platform_driver(&bbc_i2c_driver); 427 return platform_driver_register(&bbc_i2c_driver);
429} 428}
430 429
431static void __exit bbc_i2c_exit(void) 430static void __exit bbc_i2c_exit(void)
432{ 431{
433 of_unregister_platform_driver(&bbc_i2c_driver); 432 platform_driver_unregister(&bbc_i2c_driver);
434} 433}
435 434
436module_init(bbc_i2c_init); 435module_init(bbc_i2c_init);
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index 55f71ea9c418..740da4465447 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -171,8 +171,7 @@ static struct miscdevice d7s_miscdev = {
171 .fops = &d7s_fops 171 .fops = &d7s_fops
172}; 172};
173 173
174static int __devinit d7s_probe(struct platform_device *op, 174static int __devinit d7s_probe(struct platform_device *op)
175 const struct of_device_id *match)
176{ 175{
177 struct device_node *opts; 176 struct device_node *opts;
178 int err = -EINVAL; 177 int err = -EINVAL;
@@ -266,7 +265,7 @@ static const struct of_device_id d7s_match[] = {
266}; 265};
267MODULE_DEVICE_TABLE(of, d7s_match); 266MODULE_DEVICE_TABLE(of, d7s_match);
268 267
269static struct of_platform_driver d7s_driver = { 268static struct platform_driver d7s_driver = {
270 .driver = { 269 .driver = {
271 .name = DRIVER_NAME, 270 .name = DRIVER_NAME,
272 .owner = THIS_MODULE, 271 .owner = THIS_MODULE,
@@ -278,12 +277,12 @@ static struct of_platform_driver d7s_driver = {
278 277
279static int __init d7s_init(void) 278static int __init d7s_init(void)
280{ 279{
281 return of_register_platform_driver(&d7s_driver); 280 return platform_driver_register(&d7s_driver);
282} 281}
283 282
284static void __exit d7s_exit(void) 283static void __exit d7s_exit(void)
285{ 284{
286 of_unregister_platform_driver(&d7s_driver); 285 platform_driver_unregister(&d7s_driver);
287} 286}
288 287
289module_init(d7s_init); 288module_init(d7s_init);
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index 8ce414e39489..be7b4e56154f 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -1028,8 +1028,7 @@ static int kenvctrld(void *__unused)
1028 return 0; 1028 return 0;
1029} 1029}
1030 1030
1031static int __devinit envctrl_probe(struct platform_device *op, 1031static int __devinit envctrl_probe(struct platform_device *op)
1032 const struct of_device_id *match)
1033{ 1032{
1034 struct device_node *dp; 1033 struct device_node *dp;
1035 int index, err; 1034 int index, err;
@@ -1129,7 +1128,7 @@ static const struct of_device_id envctrl_match[] = {
1129}; 1128};
1130MODULE_DEVICE_TABLE(of, envctrl_match); 1129MODULE_DEVICE_TABLE(of, envctrl_match);
1131 1130
1132static struct of_platform_driver envctrl_driver = { 1131static struct platform_driver envctrl_driver = {
1133 .driver = { 1132 .driver = {
1134 .name = DRIVER_NAME, 1133 .name = DRIVER_NAME,
1135 .owner = THIS_MODULE, 1134 .owner = THIS_MODULE,
@@ -1141,12 +1140,12 @@ static struct of_platform_driver envctrl_driver = {
1141 1140
1142static int __init envctrl_init(void) 1141static int __init envctrl_init(void)
1143{ 1142{
1144 return of_register_platform_driver(&envctrl_driver); 1143 return platform_driver_register(&envctrl_driver);
1145} 1144}
1146 1145
1147static void __exit envctrl_exit(void) 1146static void __exit envctrl_exit(void)
1148{ 1147{
1149 of_unregister_platform_driver(&envctrl_driver); 1148 platform_driver_unregister(&envctrl_driver);
1150} 1149}
1151 1150
1152module_init(envctrl_init); 1151module_init(envctrl_init);
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 2b4b4b613c48..73dd4e7afaaa 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -160,8 +160,7 @@ static const struct file_operations flash_fops = {
160 160
161static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; 161static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
162 162
163static int __devinit flash_probe(struct platform_device *op, 163static int __devinit flash_probe(struct platform_device *op)
164 const struct of_device_id *match)
165{ 164{
166 struct device_node *dp = op->dev.of_node; 165 struct device_node *dp = op->dev.of_node;
167 struct device_node *parent; 166 struct device_node *parent;
@@ -207,7 +206,7 @@ static const struct of_device_id flash_match[] = {
207}; 206};
208MODULE_DEVICE_TABLE(of, flash_match); 207MODULE_DEVICE_TABLE(of, flash_match);
209 208
210static struct of_platform_driver flash_driver = { 209static struct platform_driver flash_driver = {
211 .driver = { 210 .driver = {
212 .name = "flash", 211 .name = "flash",
213 .owner = THIS_MODULE, 212 .owner = THIS_MODULE,
@@ -219,12 +218,12 @@ static struct of_platform_driver flash_driver = {
219 218
220static int __init flash_init(void) 219static int __init flash_init(void)
221{ 220{
222 return of_register_platform_driver(&flash_driver); 221 return platform_driver_register(&flash_driver);
223} 222}
224 223
225static void __exit flash_cleanup(void) 224static void __exit flash_cleanup(void)
226{ 225{
227 of_unregister_platform_driver(&flash_driver); 226 platform_driver_unregister(&flash_driver);
228} 227}
229 228
230module_init(flash_init); 229module_init(flash_init);
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index 1b345be5cc02..ebce9639a26a 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -348,8 +348,7 @@ static void uctrl_get_external_status(struct uctrl_driver *driver)
348 348
349} 349}
350 350
351static int __devinit uctrl_probe(struct platform_device *op, 351static int __devinit uctrl_probe(struct platform_device *op)
352 const struct of_device_id *match)
353{ 352{
354 struct uctrl_driver *p; 353 struct uctrl_driver *p;
355 int err = -ENOMEM; 354 int err = -ENOMEM;
@@ -425,7 +424,7 @@ static const struct of_device_id uctrl_match[] = {
425}; 424};
426MODULE_DEVICE_TABLE(of, uctrl_match); 425MODULE_DEVICE_TABLE(of, uctrl_match);
427 426
428static struct of_platform_driver uctrl_driver = { 427static struct platform_driver uctrl_driver = {
429 .driver = { 428 .driver = {
430 .name = "uctrl", 429 .name = "uctrl",
431 .owner = THIS_MODULE, 430 .owner = THIS_MODULE,
@@ -438,12 +437,12 @@ static struct of_platform_driver uctrl_driver = {
438 437
439static int __init uctrl_init(void) 438static int __init uctrl_init(void)
440{ 439{
441 return of_register_platform_driver(&uctrl_driver); 440 return platform_driver_register(&uctrl_driver);
442} 441}
443 442
444static void __exit uctrl_exit(void) 443static void __exit uctrl_exit(void)
445{ 444{
446 of_unregister_platform_driver(&uctrl_driver); 445 platform_driver_unregister(&uctrl_driver);
447} 446}
448 447
449module_init(uctrl_init); 448module_init(uctrl_init);
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 664c9572d0c9..e2d45c91b8e8 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1292,15 +1292,19 @@ static struct scsi_host_template qpti_template = {
1292 .use_clustering = ENABLE_CLUSTERING, 1292 .use_clustering = ENABLE_CLUSTERING,
1293}; 1293};
1294 1294
1295static int __devinit qpti_sbus_probe(struct platform_device *op, const struct of_device_id *match) 1295static int __devinit qpti_sbus_probe(struct platform_device *op)
1296{ 1296{
1297 struct scsi_host_template *tpnt = match->data; 1297 struct scsi_host_template *tpnt;
1298 struct device_node *dp = op->dev.of_node; 1298 struct device_node *dp = op->dev.of_node;
1299 struct Scsi_Host *host; 1299 struct Scsi_Host *host;
1300 struct qlogicpti *qpti; 1300 struct qlogicpti *qpti;
1301 static int nqptis; 1301 static int nqptis;
1302 const char *fcode; 1302 const char *fcode;
1303 1303
1304 if (!op->dev.of_match)
1305 return -EINVAL;
1306 tpnt = op->dev.of_match->data;
1307
1304 /* Sometimes Antares cards come up not completely 1308 /* Sometimes Antares cards come up not completely
1305 * setup, and we get a report of a zero IRQ. 1309 * setup, and we get a report of a zero IRQ.
1306 */ 1310 */
@@ -1457,7 +1461,7 @@ static const struct of_device_id qpti_match[] = {
1457}; 1461};
1458MODULE_DEVICE_TABLE(of, qpti_match); 1462MODULE_DEVICE_TABLE(of, qpti_match);
1459 1463
1460static struct of_platform_driver qpti_sbus_driver = { 1464static struct platform_driver qpti_sbus_driver = {
1461 .driver = { 1465 .driver = {
1462 .name = "qpti", 1466 .name = "qpti",
1463 .owner = THIS_MODULE, 1467 .owner = THIS_MODULE,
@@ -1469,12 +1473,12 @@ static struct of_platform_driver qpti_sbus_driver = {
1469 1473
1470static int __init qpti_init(void) 1474static int __init qpti_init(void)
1471{ 1475{
1472 return of_register_platform_driver(&qpti_sbus_driver); 1476 return platform_driver_register(&qpti_sbus_driver);
1473} 1477}
1474 1478
1475static void __exit qpti_exit(void) 1479static void __exit qpti_exit(void)
1476{ 1480{
1477 of_unregister_platform_driver(&qpti_sbus_driver); 1481 platform_driver_unregister(&qpti_sbus_driver);
1478} 1482}
1479 1483
1480MODULE_DESCRIPTION("QlogicISP SBUS driver"); 1484MODULE_DESCRIPTION("QlogicISP SBUS driver");
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index 193b37ba1834..676fe9ac7f61 100644
--- a/drivers/scsi/sun_esp.c
+++ b/drivers/scsi/sun_esp.c
@@ -562,7 +562,7 @@ fail:
562 return err; 562 return err;
563} 563}
564 564
565static int __devinit esp_sbus_probe(struct platform_device *op, const struct of_device_id *match) 565static int __devinit esp_sbus_probe(struct platform_device *op)
566{ 566{
567 struct device_node *dma_node = NULL; 567 struct device_node *dma_node = NULL;
568 struct device_node *dp = op->dev.of_node; 568 struct device_node *dp = op->dev.of_node;
@@ -632,7 +632,7 @@ static const struct of_device_id esp_match[] = {
632}; 632};
633MODULE_DEVICE_TABLE(of, esp_match); 633MODULE_DEVICE_TABLE(of, esp_match);
634 634
635static struct of_platform_driver esp_sbus_driver = { 635static struct platform_driver esp_sbus_driver = {
636 .driver = { 636 .driver = {
637 .name = "esp", 637 .name = "esp",
638 .owner = THIS_MODULE, 638 .owner = THIS_MODULE,
@@ -644,12 +644,12 @@ static struct of_platform_driver esp_sbus_driver = {
644 644
645static int __init sunesp_init(void) 645static int __init sunesp_init(void)
646{ 646{
647 return of_register_platform_driver(&esp_sbus_driver); 647 return platform_driver_register(&esp_sbus_driver);
648} 648}
649 649
650static void __exit sunesp_exit(void) 650static void __exit sunesp_exit(void)
651{ 651{
652 of_unregister_platform_driver(&esp_sbus_driver); 652 platform_driver_unregister(&esp_sbus_driver);
653} 653}
654 654
655MODULE_DESCRIPTION("Sun ESP SCSI driver"); 655MODULE_DESCRIPTION("Sun ESP SCSI driver");