diff options
Diffstat (limited to 'drivers/net/irda/smsc-ircc2.c')
-rw-r--r-- | drivers/net/irda/smsc-ircc2.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index a1d207f2fa68..ec94ecdb103d 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c | |||
@@ -214,14 +214,15 @@ static int smsc_ircc_probe_transceiver_smsc_ircc_atc(int fir_base); | |||
214 | 214 | ||
215 | /* Power Management */ | 215 | /* Power Management */ |
216 | 216 | ||
217 | static int smsc_ircc_suspend(struct device *dev, pm_message_t state); | 217 | static int smsc_ircc_suspend(struct platform_device *dev, pm_message_t state); |
218 | static int smsc_ircc_resume(struct device *dev); | 218 | static int smsc_ircc_resume(struct platform_device *dev); |
219 | 219 | ||
220 | static struct device_driver smsc_ircc_driver = { | 220 | static struct platform_driver smsc_ircc_driver = { |
221 | .name = SMSC_IRCC2_DRIVER_NAME, | ||
222 | .bus = &platform_bus_type, | ||
223 | .suspend = smsc_ircc_suspend, | 221 | .suspend = smsc_ircc_suspend, |
224 | .resume = smsc_ircc_resume, | 222 | .resume = smsc_ircc_resume, |
223 | .driver = { | ||
224 | .name = SMSC_IRCC2_DRIVER_NAME, | ||
225 | }, | ||
225 | }; | 226 | }; |
226 | 227 | ||
227 | /* Transceivers for SMSC-ircc */ | 228 | /* Transceivers for SMSC-ircc */ |
@@ -346,7 +347,7 @@ static int __init smsc_ircc_init(void) | |||
346 | 347 | ||
347 | IRDA_DEBUG(1, "%s\n", __FUNCTION__); | 348 | IRDA_DEBUG(1, "%s\n", __FUNCTION__); |
348 | 349 | ||
349 | ret = driver_register(&smsc_ircc_driver); | 350 | ret = platform_driver_register(&smsc_ircc_driver); |
350 | if (ret) { | 351 | if (ret) { |
351 | IRDA_ERROR("%s, Can't register driver!\n", driver_name); | 352 | IRDA_ERROR("%s, Can't register driver!\n", driver_name); |
352 | return ret; | 353 | return ret; |
@@ -378,7 +379,7 @@ static int __init smsc_ircc_init(void) | |||
378 | } | 379 | } |
379 | 380 | ||
380 | if (ret) | 381 | if (ret) |
381 | driver_unregister(&smsc_ircc_driver); | 382 | platform_driver_unregister(&smsc_ircc_driver); |
382 | 383 | ||
383 | return ret; | 384 | return ret; |
384 | } | 385 | } |
@@ -491,7 +492,7 @@ static int __init smsc_ircc_open(unsigned int fir_base, unsigned int sir_base, u | |||
491 | err = PTR_ERR(self->pldev); | 492 | err = PTR_ERR(self->pldev); |
492 | goto err_out5; | 493 | goto err_out5; |
493 | } | 494 | } |
494 | dev_set_drvdata(&self->pldev->dev, self); | 495 | platform_set_drvdata(self->pldev, self); |
495 | 496 | ||
496 | IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name); | 497 | IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name); |
497 | dev_count++; | 498 | dev_count++; |
@@ -1685,9 +1686,9 @@ static int smsc_ircc_net_close(struct net_device *dev) | |||
1685 | return 0; | 1686 | return 0; |
1686 | } | 1687 | } |
1687 | 1688 | ||
1688 | static int smsc_ircc_suspend(struct device *dev, pm_message_t state) | 1689 | static int smsc_ircc_suspend(struct platform_device *dev, pm_message_t state) |
1689 | { | 1690 | { |
1690 | struct smsc_ircc_cb *self = dev_get_drvdata(dev); | 1691 | struct smsc_ircc_cb *self = platform_get_drvdata(dev); |
1691 | 1692 | ||
1692 | if (!self->io.suspended) { | 1693 | if (!self->io.suspended) { |
1693 | IRDA_DEBUG(1, "%s, Suspending\n", driver_name); | 1694 | IRDA_DEBUG(1, "%s, Suspending\n", driver_name); |
@@ -1706,9 +1707,9 @@ static int smsc_ircc_suspend(struct device *dev, pm_message_t state) | |||
1706 | return 0; | 1707 | return 0; |
1707 | } | 1708 | } |
1708 | 1709 | ||
1709 | static int smsc_ircc_resume(struct device *dev) | 1710 | static int smsc_ircc_resume(struct platform_device *dev) |
1710 | { | 1711 | { |
1711 | struct smsc_ircc_cb *self = dev_get_drvdata(dev); | 1712 | struct smsc_ircc_cb *self = platform_get_drvdata(dev); |
1712 | 1713 | ||
1713 | if (self->io.suspended) { | 1714 | if (self->io.suspended) { |
1714 | IRDA_DEBUG(1, "%s, Waking up\n", driver_name); | 1715 | IRDA_DEBUG(1, "%s, Waking up\n", driver_name); |
@@ -1788,7 +1789,7 @@ static void __exit smsc_ircc_cleanup(void) | |||
1788 | smsc_ircc_close(dev_self[i]); | 1789 | smsc_ircc_close(dev_self[i]); |
1789 | } | 1790 | } |
1790 | 1791 | ||
1791 | driver_unregister(&smsc_ircc_driver); | 1792 | platform_driver_unregister(&smsc_ircc_driver); |
1792 | } | 1793 | } |
1793 | 1794 | ||
1794 | /* | 1795 | /* |