summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/xpp_dahdi.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2012-01-05 17:34:16 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2012-01-05 17:34:16 +0000
commit4620300643e819b1bfff9d10a42e985e5e38ece5 (patch)
tree995b6b689e79e0f539af5cb9ff4e7812620cd6eb /drivers/dahdi/xpp/xpp_dahdi.c
parentebf0e7761b327b8c59fa7ca1be370e85154d058d (diff)
xpp: Don't deactivate XPDs on unregistration
* A bug was introduced during migration to dahdi_device code: http://svnview.digium.com/svn/dahdi?view=rev&rev=10273 * Marking XPDs as non-functional (card_present=0, XPD_STATE_NOHW) was moved from xbus_request_removal() into xpd_dahdi_preunregister() * As a result, unregistering an Astribank, made it non-functional so trying to re-register it later caused errors (e.g: "Cannot open" error message from xpp_open()) * This fix move XPD deactivation into the proper location (during xbus_deactivate() Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10409 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/xpp_dahdi.c')
-rw-r--r--drivers/dahdi/xpp/xpp_dahdi.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c
index a53f2d2..1bfed84 100644
--- a/drivers/dahdi/xpp/xpp_dahdi.c
+++ b/drivers/dahdi/xpp/xpp_dahdi.c
@@ -1082,14 +1082,9 @@ int xpd_dahdi_postregister(xpd_t *xpd)
*/
void xpd_dahdi_preunregister(xpd_t *xpd)
{
- unsigned long flags;
if (!xpd)
return;
XPD_DBG(DEVICES, xpd, "\n");
- spin_lock_irqsave(&xpd->lock, flags);
- xpd->card_present = 0;
- xpd_setstate(xpd, XPD_STATE_NOHW);
- spin_unlock_irqrestore(&xpd->lock, flags);
update_xpd_status(xpd, DAHDI_ALARM_NOTOPEN);
if(xpd->card_present)
CALL_PHONE_METHOD(card_dahdi_preregistration, xpd, 0);