From d6035ac6ad1c10d867c57cd53e074fa521a537b0 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Tue, 13 Jul 2010 09:42:45 +0000 Subject: 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 --- drivers/dahdi/xpp/xpp_dahdi.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/dahdi/xpp/xpp_dahdi.c') 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; -- cgit v1.2.3