aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/tcic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/tcic.c')
-rw-r--r--drivers/pcmcia/tcic.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c
index 2a613e920fd4..9ad97ea836e8 100644
--- a/drivers/pcmcia/tcic.c
+++ b/drivers/pcmcia/tcic.c
@@ -363,13 +363,25 @@ static int __init get_tcic_id(void)
363 return id; 363 return id;
364} 364}
365 365
366static int tcic_drv_pcmcia_suspend(struct platform_device *dev,
367 pm_message_t state)
368{
369 return pcmcia_socket_dev_suspend(&dev->dev, state);
370}
371
372static int tcic_drv_pcmcia_resume(struct platform_device *dev)
373{
374 return pcmcia_socket_dev_resume(&dev->dev);
375}
366/*====================================================================*/ 376/*====================================================================*/
367 377
368static struct device_driver tcic_driver = { 378static struct platform_driver tcic_driver = {
369 .name = "tcic-pcmcia", 379 .driver = {
370 .bus = &platform_bus_type, 380 .name = "tcic-pcmcia",
371 .suspend = pcmcia_socket_dev_suspend, 381 .owner = THIS_MODULE,
372 .resume = pcmcia_socket_dev_resume, 382 },
383 .suspend = tcic_drv_pcmcia_suspend,
384 .resume = tcic_drv_pcmcia_resume,
373}; 385};
374 386
375static struct platform_device tcic_device = { 387static struct platform_device tcic_device = {
@@ -383,7 +395,7 @@ static int __init init_tcic(void)
383 int i, sock, ret = 0; 395 int i, sock, ret = 0;
384 u_int mask, scan; 396 u_int mask, scan;
385 397
386 if (driver_register(&tcic_driver)) 398 if (platform_driver_register(&tcic_driver))
387 return -1; 399 return -1;
388 400
389 printk(KERN_INFO "Databook TCIC-2 PCMCIA probe: "); 401 printk(KERN_INFO "Databook TCIC-2 PCMCIA probe: ");
@@ -391,7 +403,7 @@ static int __init init_tcic(void)
391 403
392 if (!request_region(tcic_base, 16, "tcic-2")) { 404 if (!request_region(tcic_base, 16, "tcic-2")) {
393 printk("could not allocate ports,\n "); 405 printk("could not allocate ports,\n ");
394 driver_unregister(&tcic_driver); 406 platform_driver_unregister(&tcic_driver);
395 return -ENODEV; 407 return -ENODEV;
396 } 408 }
397 else { 409 else {
@@ -414,7 +426,7 @@ static int __init init_tcic(void)
414 if (sock == 0) { 426 if (sock == 0) {
415 printk("not found.\n"); 427 printk("not found.\n");
416 release_region(tcic_base, 16); 428 release_region(tcic_base, 16);
417 driver_unregister(&tcic_driver); 429 platform_driver_unregister(&tcic_driver);
418 return -ENODEV; 430 return -ENODEV;
419 } 431 }
420 432
@@ -542,7 +554,7 @@ static void __exit exit_tcic(void)
542 } 554 }
543 555
544 platform_device_unregister(&tcic_device); 556 platform_device_unregister(&tcic_device);
545 driver_unregister(&tcic_driver); 557 platform_driver_unregister(&tcic_driver);
546} /* exit_tcic */ 558} /* exit_tcic */
547 559
548/*====================================================================*/ 560/*====================================================================*/