diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-08-14 20:40:55 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-08-14 20:40:55 +0000 |
commit | 366a8f82a1f8a9662116b8a20b0bec8a17ef6143 (patch) | |
tree | d20c82bcd921a62be068d7a9c3549ebd0ce74739 | |
parent | be370e2b5b974e1de4751e8ff966bcb6be2100e3 (diff) |
revert this change until a version that compiles on 2.4 kernels and older 2.6 kernels is made available and tested
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@1306 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | zaptel.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -1091,14 +1091,8 @@ static int set_tone_zone(struct zt_chan *chan, int zone) /* Assumes channel is already locked */ if ((zone >= ZT_TONE_ZONE_MAX) || (zone < -1)) return -EINVAL; - - /* Since this routine is called both from IRQ as well as from userspace, - * it is possible that we could be called during an IRQ while userspace - * has locked this. However unlikely, this could possibly cause a - * deadlock. */ - if (! read_trylock(&zone_lock)) - return -EWOULDBLOCK; - + + read_lock(&zone_lock); if (zone == -1) { zone = default_zone; } @@ -1109,7 +1103,7 @@ static int set_tone_zone(struct zt_chan *chan, int zone) } else { res = -ENODATA; } - + read_unlock(&zone_lock); return res; } |