diff options
Diffstat (limited to 'drivers/net/irda/pxaficp_ir.c')
-rw-r--r-- | drivers/net/irda/pxaficp_ir.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index 8c09344f58dc..8db71ab20456 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <asm/hardware.h> | 36 | #include <asm/hardware.h> |
37 | #include <asm/arch/irda.h> | 37 | #include <asm/arch/irda.h> |
38 | #include <asm/arch/pxa-regs.h> | 38 | #include <asm/arch/pxa-regs.h> |
39 | #include <asm/arch/pxa2xx-gpio.h> | ||
39 | 40 | ||
40 | #ifdef CONFIG_MACH_MAINSTONE | 41 | #ifdef CONFIG_MACH_MAINSTONE |
41 | #include <asm/arch/mainstone.h> | 42 | #include <asm/arch/mainstone.h> |
@@ -831,6 +832,11 @@ static int pxa_irda_probe(struct platform_device *pdev) | |||
831 | if (err) | 832 | if (err) |
832 | goto err_mem_5; | 833 | goto err_mem_5; |
833 | 834 | ||
835 | if (si->pdata->startup) | ||
836 | err = si->pdata->startup(si->dev); | ||
837 | if (err) | ||
838 | goto err_startup; | ||
839 | |||
834 | dev->hard_start_xmit = pxa_irda_hard_xmit; | 840 | dev->hard_start_xmit = pxa_irda_hard_xmit; |
835 | dev->open = pxa_irda_start; | 841 | dev->open = pxa_irda_start; |
836 | dev->stop = pxa_irda_stop; | 842 | dev->stop = pxa_irda_stop; |
@@ -856,6 +862,9 @@ static int pxa_irda_probe(struct platform_device *pdev) | |||
856 | dev_set_drvdata(&pdev->dev, dev); | 862 | dev_set_drvdata(&pdev->dev, dev); |
857 | 863 | ||
858 | if (err) { | 864 | if (err) { |
865 | if (si->pdata->shutdown) | ||
866 | si->pdata->shutdown(si->dev); | ||
867 | err_startup: | ||
859 | kfree(si->tx_buff.head); | 868 | kfree(si->tx_buff.head); |
860 | err_mem_5: | 869 | err_mem_5: |
861 | kfree(si->rx_buff.head); | 870 | kfree(si->rx_buff.head); |
@@ -881,6 +890,8 @@ static int pxa_irda_remove(struct platform_device *_dev) | |||
881 | if (dev) { | 890 | if (dev) { |
882 | struct pxa_irda *si = netdev_priv(dev); | 891 | struct pxa_irda *si = netdev_priv(dev); |
883 | unregister_netdev(dev); | 892 | unregister_netdev(dev); |
893 | if (si->pdata->shutdown) | ||
894 | si->pdata->shutdown(si->dev); | ||
884 | kfree(si->tx_buff.head); | 895 | kfree(si->tx_buff.head); |
885 | kfree(si->rx_buff.head); | 896 | kfree(si->rx_buff.head); |
886 | clk_put(si->fir_clk); | 897 | clk_put(si->fir_clk); |