summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-10-27 15:57:44 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-10-27 15:57:44 +0000
commit1dfdd987165c27d786ef28abd78eca0b67dff62a (patch)
tree4b1e2eb3688f00071f93980e1c497fdc37359192
parentb50e5115b88a2cf02503b0684d6eeecf0c4807c8 (diff)
xpp: remove an unused manual reference count field.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5132 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/xpp/xbus-core.c8
-rw-r--r--drivers/dahdi/xpp/xbus-core.h1
-rw-r--r--drivers/dahdi/xpp/xpp_dahdi.c3
3 files changed, 0 insertions, 12 deletions
diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c
index f868c0e..75363da 100644
--- a/drivers/dahdi/xpp/xbus-core.c
+++ b/drivers/dahdi/xpp/xbus-core.c
@@ -663,7 +663,6 @@ int xbus_xpd_bind(xbus_t *xbus, xpd_t *xpd, int unit, int subunit)
xpd->xbus_idx = xpd_num;
xbus->xpds[xpd_num] = xpd;
xpd->xbus = xbus;
- atomic_inc(&xbus->xbus_ref_count);
atomic_inc(&xbus->num_xpds);
spin_unlock_irqrestore(&xbus->lock, flags);
/* Must be done out of atomic context */
@@ -1224,9 +1223,6 @@ void xbus_disconnect(xbus_t *xbus)
worker_destroy(xbus->worker);
XBUS_DBG(DEVICES, xbus, "Deactivated refcount_xbus=%d\n",
refcount_xbus(xbus));
- if(atomic_dec_and_test(&xbus->xbus_ref_count)) {
- XBUS_DBG(DEVICES, xbus, "%s: Last ref to xbus. Removing\n", __FUNCTION__);
- }
xbus_sysfs_remove(xbus); /* Device-Model */
}
@@ -1325,7 +1321,6 @@ xbus_t *xbus_new(struct xbus_ops *ops, ushort max_send_size, void *priv)
XBUS_DBG(DEVICES, xbus, "\n");
transport_init(xbus, ops, max_send_size, priv);
spin_lock_init(&xbus->lock);
- atomic_set(&xbus->xbus_ref_count, 1); /* a single ref */
init_waitqueue_head(&xbus->command_queue_empty);
init_timer(&xbus->command_timer);
init_MUTEX(&xbus->in_worker);
@@ -1457,9 +1452,6 @@ static int xbus_read_proc(char *page, char **start, off_t off, int count, int *e
xbus->label,
(!XBUS_IS(xbus, DISCONNECTED)) ? "connected" : "missing"
);
- len += sprintf(page + len, "\nxbus_ref_count=%d\n",
- atomic_read(&xbus->xbus_ref_count)
- );
len += xbus_fill_proc_queue(page + len, &xbus->send_pool);
len += xbus_fill_proc_queue(page + len, &xbus->receive_pool);
len += xbus_fill_proc_queue(page + len, &xbus->command_queue);
diff --git a/drivers/dahdi/xpp/xbus-core.h b/drivers/dahdi/xpp/xbus-core.h
index 92d9b12..ee71954 100644
--- a/drivers/dahdi/xpp/xbus-core.h
+++ b/drivers/dahdi/xpp/xbus-core.h
@@ -199,7 +199,6 @@ struct xbus {
#define dev_to_xbus(dev) container_of(dev, struct xbus, astribank)
spinlock_t lock;
- atomic_t xbus_ref_count; /* How many need this struct? */
/* PCM metrics */
struct timeval last_tx_sync;
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c
index b1a7121..9c4963f 100644
--- a/drivers/dahdi/xpp/xpp_dahdi.c
+++ b/drivers/dahdi/xpp/xpp_dahdi.c
@@ -594,9 +594,6 @@ void xpd_remove(xpd_t *xpd)
dahdi_unregister_xpd(xpd);
CALL_XMETHOD(card_remove, xbus, xpd);
xpd_free(xpd);
- if(atomic_dec_and_test(&xbus->xbus_ref_count)) {
- XBUS_DBG(DEVICES, xbus, "%s: Last ref to xbus. Removing\n", __FUNCTION__);
- }
}
void update_xpd_status(xpd_t *xpd, int alarm_flag)