aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/sa1100_ir.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/irda/sa1100_ir.c')
-rw-r--r--drivers/net/irda/sa1100_ir.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index 76e0b9fb5e96..63d38fbbd04e 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -291,9 +291,9 @@ static void sa1100_irda_shutdown(struct sa1100_irda *si)
291/* 291/*
292 * Suspend the IrDA interface. 292 * Suspend the IrDA interface.
293 */ 293 */
294static int sa1100_irda_suspend(struct device *_dev, pm_message_t state) 294static int sa1100_irda_suspend(struct platform_device *pdev, pm_message_t state)
295{ 295{
296 struct net_device *dev = dev_get_drvdata(_dev); 296 struct net_device *dev = platform_get_drvdata(pdev);
297 struct sa1100_irda *si; 297 struct sa1100_irda *si;
298 298
299 if (!dev) 299 if (!dev)
@@ -316,9 +316,9 @@ static int sa1100_irda_suspend(struct device *_dev, pm_message_t state)
316/* 316/*
317 * Resume the IrDA interface. 317 * Resume the IrDA interface.
318 */ 318 */
319static int sa1100_irda_resume(struct device *_dev) 319static int sa1100_irda_resume(struct platform_device *pdev)
320{ 320{
321 struct net_device *dev = dev_get_drvdata(_dev); 321 struct net_device *dev = platform_get_drvdata(pdev);
322 struct sa1100_irda *si; 322 struct sa1100_irda *si;
323 323
324 if (!dev) 324 if (!dev)
@@ -886,9 +886,8 @@ static int sa1100_irda_init_iobuf(iobuff_t *io, int size)
886 return io->head ? 0 : -ENOMEM; 886 return io->head ? 0 : -ENOMEM;
887} 887}
888 888
889static int sa1100_irda_probe(struct device *_dev) 889static int sa1100_irda_probe(struct platform_device *pdev)
890{ 890{
891 struct platform_device *pdev = to_platform_device(_dev);
892 struct net_device *dev; 891 struct net_device *dev;
893 struct sa1100_irda *si; 892 struct sa1100_irda *si;
894 unsigned int baudrate_mask; 893 unsigned int baudrate_mask;
@@ -967,7 +966,7 @@ static int sa1100_irda_probe(struct device *_dev)
967 966
968 err = register_netdev(dev); 967 err = register_netdev(dev);
969 if (err == 0) 968 if (err == 0)
970 dev_set_drvdata(&pdev->dev, dev); 969 platform_set_drvdata(pdev, dev);
971 970
972 if (err) { 971 if (err) {
973 err_mem_5: 972 err_mem_5:
@@ -985,9 +984,9 @@ static int sa1100_irda_probe(struct device *_dev)
985 return err; 984 return err;
986} 985}
987 986
988static int sa1100_irda_remove(struct device *_dev) 987static int sa1100_irda_remove(struct platform_device *pdev)
989{ 988{
990 struct net_device *dev = dev_get_drvdata(_dev); 989 struct net_device *dev = platform_get_drvdata(pdev);
991 990
992 if (dev) { 991 if (dev) {
993 struct sa1100_irda *si = dev->priv; 992 struct sa1100_irda *si = dev->priv;
@@ -1004,13 +1003,14 @@ static int sa1100_irda_remove(struct device *_dev)
1004 return 0; 1003 return 0;
1005} 1004}
1006 1005
1007static struct device_driver sa1100ir_driver = { 1006static struct platform_driver sa1100ir_driver = {
1008 .name = "sa11x0-ir",
1009 .bus = &platform_bus_type,
1010 .probe = sa1100_irda_probe, 1007 .probe = sa1100_irda_probe,
1011 .remove = sa1100_irda_remove, 1008 .remove = sa1100_irda_remove,
1012 .suspend = sa1100_irda_suspend, 1009 .suspend = sa1100_irda_suspend,
1013 .resume = sa1100_irda_resume, 1010 .resume = sa1100_irda_resume,
1011 .driver = {
1012 .name = "sa11x0-ir",
1013 },
1014}; 1014};
1015 1015
1016static int __init sa1100_irda_init(void) 1016static int __init sa1100_irda_init(void)
@@ -1023,12 +1023,12 @@ static int __init sa1100_irda_init(void)
1023 if (power_level > 3) 1023 if (power_level > 3)
1024 power_level = 3; 1024 power_level = 3;
1025 1025
1026 return driver_register(&sa1100ir_driver); 1026 return platform_driver_register(&sa1100ir_driver);
1027} 1027}
1028 1028
1029static void __exit sa1100_irda_exit(void) 1029static void __exit sa1100_irda_exit(void)
1030{ 1030{
1031 driver_unregister(&sa1100ir_driver); 1031 platform_driver_unregister(&sa1100ir_driver);
1032} 1032}
1033 1033
1034module_init(sa1100_irda_init); 1034module_init(sa1100_irda_init);