From 3ff8daeeeeec6614aa019fbc54e3e8fe708f03ee Mon Sep 17 00:00:00 2001 From: Eric Holmberg Date: Tue, 19 Jul 2011 18:50:15 -0600 Subject: [PATCH] msm: sdio_dmux: do subsystem restart client notification earlier Perform the receive_cb(NULL) notification before cleaning up any pending write skb's. This allows clients to update their cached reset status based upon the receive_cb(NULL) in case they need to do special handling of the cancelled write skb's. Signed-off-by: Eric Holmberg --- arch/arm/mach-msm/sdio_dmux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-msm/sdio_dmux.c b/arch/arm/mach-msm/sdio_dmux.c index 6377c58a432..c99840312ab 100644 --- a/arch/arm/mach-msm/sdio_dmux.c +++ b/arch/arm/mach-msm/sdio_dmux.c @@ -867,6 +867,11 @@ static int sdio_dmux_remove(struct platform_device *pdev) sdio_ch[i].status |= SDIO_CH_IN_RESET; sdio_ch[i].status &= ~SDIO_CH_REMOTE_OPEN; + /* notify client so it can update its status */ + if (sdio_ch[i].receive_cb) + sdio_ch[i].receive_cb( + sdio_ch[i].priv, NULL); + /* cancel any pending writes */ spin_lock_irqsave(&sdio_mux_write_lock, write_lock_flags); @@ -879,11 +884,6 @@ static int sdio_dmux_remove(struct platform_device *pdev) } spin_unlock_irqrestore(&sdio_mux_write_lock, write_lock_flags); - - /* notify client so it can update its status */ - if (sdio_ch[i].receive_cb) - sdio_ch[i].receive_cb( - sdio_ch[i].priv, NULL); } spin_unlock_irqrestore(&sdio_ch[i].lock, ch_lock_flags); }