aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring/proteon.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-11 12:24:26 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-11 12:24:26 -0500
commit5643f000c1e10ab991182478b76550e1364c3570 (patch)
tree950b2f61a5dd742de1c668ba968a9c8a99f1eab6 /drivers/net/tokenring/proteon.c
parent177294d19174cf92de22434bb1fc9a8ecdbbe658 (diff)
parent3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
Diffstat (limited to 'drivers/net/tokenring/proteon.c')
-rw-r--r--drivers/net/tokenring/proteon.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c
index d04c918ebef8..4f756960db2a 100644
--- a/drivers/net/tokenring/proteon.c
+++ b/drivers/net/tokenring/proteon.c
@@ -344,9 +344,10 @@ module_param_array(dma, int, NULL, 0);
344 344
345static struct platform_device *proteon_dev[ISATR_MAX_ADAPTERS]; 345static struct platform_device *proteon_dev[ISATR_MAX_ADAPTERS];
346 346
347static struct device_driver proteon_driver = { 347static struct platform_driver proteon_driver = {
348 .name = "proteon", 348 .driver = {
349 .bus = &platform_bus_type, 349 .name = "proteon",
350 },
350}; 351};
351 352
352static int __init proteon_init(void) 353static int __init proteon_init(void)
@@ -355,7 +356,7 @@ static int __init proteon_init(void)
355 struct platform_device *pdev; 356 struct platform_device *pdev;
356 int i, num = 0, err = 0; 357 int i, num = 0, err = 0;
357 358
358 err = driver_register(&proteon_driver); 359 err = platform_driver_register(&proteon_driver);
359 if (err) 360 if (err)
360 return err; 361 return err;
361 362
@@ -372,7 +373,7 @@ static int __init proteon_init(void)
372 err = setup_card(dev, &pdev->dev); 373 err = setup_card(dev, &pdev->dev);
373 if (!err) { 374 if (!err) {
374 proteon_dev[i] = pdev; 375 proteon_dev[i] = pdev;
375 dev_set_drvdata(&pdev->dev, dev); 376 platform_set_drvdata(pdev, dev);
376 ++num; 377 ++num;
377 } else { 378 } else {
378 platform_device_unregister(pdev); 379 platform_device_unregister(pdev);
@@ -399,17 +400,17 @@ static void __exit proteon_cleanup(void)
399 400
400 if (!pdev) 401 if (!pdev)
401 continue; 402 continue;
402 dev = dev_get_drvdata(&pdev->dev); 403 dev = platform_get_drvdata(pdev);
403 unregister_netdev(dev); 404 unregister_netdev(dev);
404 release_region(dev->base_addr, PROTEON_IO_EXTENT); 405 release_region(dev->base_addr, PROTEON_IO_EXTENT);
405 free_irq(dev->irq, dev); 406 free_irq(dev->irq, dev);
406 free_dma(dev->dma); 407 free_dma(dev->dma);
407 tmsdev_term(dev); 408 tmsdev_term(dev);
408 free_netdev(dev); 409 free_netdev(dev);
409 dev_set_drvdata(&pdev->dev, NULL); 410 platform_set_drvdata(pdev, NULL);
410 platform_device_unregister(pdev); 411 platform_device_unregister(pdev);
411 } 412 }
412 driver_unregister(&proteon_driver); 413 platform_driver_unregister(&proteon_driver);
413} 414}
414 415
415module_init(proteon_init); 416module_init(proteon_init);