diff options
Diffstat (limited to 'drivers/pcmcia/m32r_pcc.c')
-rw-r--r-- | drivers/pcmcia/m32r_pcc.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c index 2f108c2..12034b4 100644 --- a/drivers/pcmcia/m32r_pcc.c +++ b/drivers/pcmcia/m32r_pcc.c @@ -672,13 +672,25 @@ static struct pccard_operations pcc_operations = { .set_mem_map = pcc_set_mem_map, }; +static int pcc_drv_pcmcia_suspend(struct platform_device *dev, + pm_message_t state) +{ + return pcmcia_socket_dev_suspend(&dev->dev, state); +} + +static int pcc_drv_pcmcia_resume(struct platform_device *dev) +{ + return pcmcia_socket_dev_resume(&dev->dev); +} /*====================================================================*/ -static struct device_driver pcc_driver = { - .name = "pcc", - .bus = &platform_bus_type, - .suspend = pcmcia_socket_dev_suspend, - .resume = pcmcia_socket_dev_resume, +static struct platform_driver pcc_driver = { + .driver = { + .name = "pcc", + .owner = THIS_MODULE, + }, + .suspend = pcc_drv_pcmcia_suspend, + .resume = pcc_drv_pcmcia_resume, }; static struct platform_device pcc_device = { @@ -692,13 +704,13 @@ static int __init init_m32r_pcc(void) { int i, ret; - ret = driver_register(&pcc_driver); + ret = platform_driver_register(&pcc_driver); if (ret) return ret; ret = platform_device_register(&pcc_device); if (ret){ - driver_unregister(&pcc_driver); + platform_driver_unregister(&pcc_driver); return ret; } @@ -715,7 +727,7 @@ static int __init init_m32r_pcc(void) if (pcc_sockets == 0) { printk("socket is not found.\n"); platform_device_unregister(&pcc_device); - driver_unregister(&pcc_driver); + platform_driver_unregister(&pcc_driver); return -ENODEV; } @@ -763,7 +775,7 @@ static void __exit exit_m32r_pcc(void) if (poll_interval != 0) del_timer_sync(&poll_timer); - driver_unregister(&pcc_driver); + platform_driver_unregister(&pcc_driver); } /* exit_m32r_pcc */ module_init(init_m32r_pcc); |