diff options
author | Paul Sokolovsky <pmiscml@gmail.com> | 2006-12-06 23:07:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-12-06 23:07:59 -0500 |
commit | b259e7d250e15d45b3c8362917931aaff1c88d73 (patch) | |
tree | 230a710ae5f58a3b7fd4e3aea16c63c57548b1ed /drivers/net/irda | |
parent | 48d4ed7a86d70a7e381cc8e48a97312182093ce2 (diff) |
[IrDA]: PXA FIR code device model conversion
pxaficp_ir.c was not converted to the device model framework.
Signed-off-by: Paul Sokolovsky <pmiscml@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | drivers/net/irda/pxaficp_ir.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index f9a1c88a4283..9137e239fac2 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
@@ -704,9 +704,9 @@ static int pxa_irda_stop(struct net_device *dev) | |||
704 | return 0; | 704 | return 0; |
705 | } | 705 | } |
706 | 706 | ||
707 | static int pxa_irda_suspend(struct device *_dev, pm_message_t state) | 707 | static int pxa_irda_suspend(struct platform_device *_dev, pm_message_t state) |
708 | { | 708 | { |
709 | struct net_device *dev = dev_get_drvdata(_dev); | 709 | struct net_device *dev = platform_get_drvdata(_dev); |
710 | struct pxa_irda *si; | 710 | struct pxa_irda *si; |
711 | 711 | ||
712 | if (dev && netif_running(dev)) { | 712 | if (dev && netif_running(dev)) { |
@@ -718,9 +718,9 @@ static int pxa_irda_suspend(struct device *_dev, pm_message_t state) | |||
718 | return 0; | 718 | return 0; |
719 | } | 719 | } |
720 | 720 | ||
721 | static int pxa_irda_resume(struct device *_dev) | 721 | static int pxa_irda_resume(struct platform_device *_dev) |
722 | { | 722 | { |
723 | struct net_device *dev = dev_get_drvdata(_dev); | 723 | struct net_device *dev = platform_get_drvdata(_dev); |
724 | struct pxa_irda *si; | 724 | struct pxa_irda *si; |
725 | 725 | ||
726 | if (dev && netif_running(dev)) { | 726 | if (dev && netif_running(dev)) { |
@@ -746,9 +746,8 @@ static int pxa_irda_init_iobuf(iobuff_t *io, int size) | |||
746 | return io->head ? 0 : -ENOMEM; | 746 | return io->head ? 0 : -ENOMEM; |
747 | } | 747 | } |
748 | 748 | ||
749 | static int pxa_irda_probe(struct device *_dev) | 749 | static int pxa_irda_probe(struct platform_device *pdev) |
750 | { | 750 | { |
751 | struct platform_device *pdev = to_platform_device(_dev); | ||
752 | struct net_device *dev; | 751 | struct net_device *dev; |
753 | struct pxa_irda *si; | 752 | struct pxa_irda *si; |
754 | unsigned int baudrate_mask; | 753 | unsigned int baudrate_mask; |
@@ -822,9 +821,9 @@ err_mem_1: | |||
822 | return err; | 821 | return err; |
823 | } | 822 | } |
824 | 823 | ||
825 | static int pxa_irda_remove(struct device *_dev) | 824 | static int pxa_irda_remove(struct platform_device *_dev) |
826 | { | 825 | { |
827 | struct net_device *dev = dev_get_drvdata(_dev); | 826 | struct net_device *dev = platform_get_drvdata(_dev); |
828 | 827 | ||
829 | if (dev) { | 828 | if (dev) { |
830 | struct pxa_irda *si = netdev_priv(dev); | 829 | struct pxa_irda *si = netdev_priv(dev); |
@@ -840,9 +839,10 @@ static int pxa_irda_remove(struct device *_dev) | |||
840 | return 0; | 839 | return 0; |
841 | } | 840 | } |
842 | 841 | ||
843 | static struct device_driver pxa_ir_driver = { | 842 | static struct platform_driver pxa_ir_driver = { |
844 | .name = "pxa2xx-ir", | 843 | .driver = { |
845 | .bus = &platform_bus_type, | 844 | .name = "pxa2xx-ir", |
845 | }, | ||
846 | .probe = pxa_irda_probe, | 846 | .probe = pxa_irda_probe, |
847 | .remove = pxa_irda_remove, | 847 | .remove = pxa_irda_remove, |
848 | .suspend = pxa_irda_suspend, | 848 | .suspend = pxa_irda_suspend, |
@@ -851,12 +851,12 @@ static struct device_driver pxa_ir_driver = { | |||
851 | 851 | ||
852 | static int __init pxa_irda_init(void) | 852 | static int __init pxa_irda_init(void) |
853 | { | 853 | { |
854 | return driver_register(&pxa_ir_driver); | 854 | return platform_driver_register(&pxa_ir_driver); |
855 | } | 855 | } |
856 | 856 | ||
857 | static void __exit pxa_irda_exit(void) | 857 | static void __exit pxa_irda_exit(void) |
858 | { | 858 | { |
859 | driver_unregister(&pxa_ir_driver); | 859 | platform_driver_unregister(&pxa_ir_driver); |
860 | } | 860 | } |
861 | 861 | ||
862 | module_init(pxa_irda_init); | 862 | module_init(pxa_irda_init); |