From cedc77f20d144fc3019479f373197efde1aaaaf4 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Sat, 12 Apr 2008 20:08:16 +0100 Subject: [PATCH] --- yaml --- r: 91260 b: refs/heads/master c: baf1c5d2a08c828d6333e0a37bcdf5afb3d5d003 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/irda/pxaficp_ir.c | 10 ++++++++++ trunk/include/asm-arm/arch-pxa/irda.h | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index cdd8d3e0a02f..5d1d9656f585 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e21e2d467ab4dd050dd02620c74be1e2665d20b9 +refs/heads/master: baf1c5d2a08c828d6333e0a37bcdf5afb3d5d003 diff --git a/trunk/drivers/net/irda/pxaficp_ir.c b/trunk/drivers/net/irda/pxaficp_ir.c index 8239c520f1ef..8db71ab20456 100644 --- a/trunk/drivers/net/irda/pxaficp_ir.c +++ b/trunk/drivers/net/irda/pxaficp_ir.c @@ -832,6 +832,11 @@ static int pxa_irda_probe(struct platform_device *pdev) if (err) goto err_mem_5; + if (si->pdata->startup) + err = si->pdata->startup(si->dev); + if (err) + goto err_startup; + dev->hard_start_xmit = pxa_irda_hard_xmit; dev->open = pxa_irda_start; dev->stop = pxa_irda_stop; @@ -857,6 +862,9 @@ static int pxa_irda_probe(struct platform_device *pdev) dev_set_drvdata(&pdev->dev, dev); if (err) { + if (si->pdata->shutdown) + si->pdata->shutdown(si->dev); +err_startup: kfree(si->tx_buff.head); err_mem_5: kfree(si->rx_buff.head); @@ -882,6 +890,8 @@ static int pxa_irda_remove(struct platform_device *_dev) if (dev) { struct pxa_irda *si = netdev_priv(dev); unregister_netdev(dev); + if (si->pdata->shutdown) + si->pdata->shutdown(si->dev); kfree(si->tx_buff.head); kfree(si->rx_buff.head); clk_put(si->fir_clk); diff --git a/trunk/include/asm-arm/arch-pxa/irda.h b/trunk/include/asm-arm/arch-pxa/irda.h index 748406f384c2..99f4f423a8e1 100644 --- a/trunk/include/asm-arm/arch-pxa/irda.h +++ b/trunk/include/asm-arm/arch-pxa/irda.h @@ -10,6 +10,8 @@ struct pxaficp_platform_data { int transceiver_cap; void (*transceiver_mode)(struct device *dev, int mode); + int (*startup)(struct device *dev); + void (*shutdown)(struct device *dev); }; extern void pxa_set_ficp_info(struct pxaficp_platform_data *info);