diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-08-14 20:42:35 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-08-14 20:42:35 +0000 |
commit | 5ef86be417c154b7679e4c1905036c760b74cd28 (patch) | |
tree | ff9b2b81f20d8a4ae3391a175cf2102413f077de /zaptel.c | |
parent | 02fbc672c6aaad12d8d4fea2ffdaba4b8f0d93e2 (diff) |
Merged revisions 1306 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2
........
r1306 | kpfleming | 2006-08-14 15:40:55 -0500 (Mon, 14 Aug 2006) | 2 lines
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/trunk@1307 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.c')
-rw-r--r-- | zaptel.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -1135,14 +1135,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; } @@ -1153,7 +1147,7 @@ static int set_tone_zone(struct zt_chan *chan, int zone) } else { res = -ENODATA; } - + read_unlock(&zone_lock); return res; } |