diff options
-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; } |