diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2010-07-13 09:42:45 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2010-07-13 09:42:45 +0000 |
commit | d6035ac6ad1c10d867c57cd53e074fa521a537b0 (patch) | |
tree | 9af22ba8a433532636b3d6c7936f26fbed9ddab1 /drivers/dahdi/xpp/xpp_dahdi.c | |
parent | 330259c92d09fba56efca9d5be4cd2b237645725 (diff) |
put xbus->worker in xbus; wake_up_interruptible_all()
* The worker member of 'struct xbus' is now an embedded struct xbus_workqueue.
* Replace wake_up() to wake_up_interruptible_all().
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8882 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/xpp_dahdi.c')
-rw-r--r-- | drivers/dahdi/xpp/xpp_dahdi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c index 26fa223..443885c 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.c +++ b/drivers/dahdi/xpp/xpp_dahdi.c @@ -249,6 +249,9 @@ void xpd_free(xpd_t *xpd) } KZFREE(xpd); DBG(DEVICES, "refcount_xbus=%d\n", refcount_xbus(xbus)); + /* + * This must be last, so the xbus cannot be released before the xpd + */ put_xbus(__FUNCTION__, xbus); /* was taken in xpd_alloc() */ } @@ -555,6 +558,10 @@ __must_check xpd_t *xpd_alloc(xbus_t *xbus, xbus_xpd_bind(xbus, xpd, unit, subunit); if(xpd_proc_create(xbus, xpd) < 0) goto err; + /* + * This makes sure the xbus cannot be removed before this xpd + * is removed in xpd_free() + */ xbus = get_xbus(__FUNCTION__, xbus); /* returned in xpd_free() */ xproto_get(type); /* will be returned in xpd_free() */ return xpd; |