diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2013-05-13 00:02:55 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-16 16:11:08 -0700 |
commit | 550e579a3760af9bd644d5406f92d50f608847bc (patch) | |
tree | a3d09c87b2c4b42fd519daa63f92e4407e07e35c /drivers/staging/speakup | |
parent | 2da11ba637216890249c5accdabae20d04883d32 (diff) | |
download | linux-550e579a3760af9bd644d5406f92d50f608847bc.tar.gz linux-550e579a3760af9bd644d5406f92d50f608847bc.tar.bz2 linux-550e579a3760af9bd644d5406f92d50f608847bc.zip |
staging: speakup: i18n: remove custom locking macros
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r-- | drivers/staging/speakup/i18n.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/speakup/i18n.c b/drivers/staging/speakup/i18n.c index 2add1fcfd122..9ea16c5b4d6c 100644 --- a/drivers/staging/speakup/i18n.c +++ b/drivers/staging/speakup/i18n.c @@ -558,11 +558,11 @@ ssize_t spk_msg_set(enum msg_index_t index, char *text, size_t length) kfree(newstr); return -EINVAL; } - spk_lock(flags); + spin_lock_irqsave(&speakup_info.spinlock, flags); if (speakup_msgs[index] != speakup_default_msgs[index]) kfree(speakup_msgs[index]); speakup_msgs[index] = newstr; - spk_unlock(flags); + spin_unlock_irqrestore(&speakup_info.spinlock, flags); } else { rc = -ENOMEM; } @@ -595,14 +595,14 @@ void spk_reset_msg_group(struct msg_group_t *group) unsigned long flags; enum msg_index_t i; - spk_lock(flags); + spin_lock_irqsave(&speakup_info.spinlock, flags); for (i = group->start; i <= group->end; i++) { if (speakup_msgs[i] != speakup_default_msgs[i]) kfree(speakup_msgs[i]); speakup_msgs[i] = speakup_default_msgs[i]; } - spk_unlock(flags); + spin_unlock_irqrestore(&speakup_info.spinlock, flags); } /* Called at initialization time, to establish default messages. */ @@ -618,12 +618,12 @@ void spk_free_user_msgs(void) enum msg_index_t index; unsigned long flags; - spk_lock(flags); + spin_lock_irqsave(&speakup_info.spinlock, flags); for (index = MSG_FIRST_INDEX; index < MSG_LAST_INDEX; index++) { if (speakup_msgs[index] != speakup_default_msgs[index]) { kfree(speakup_msgs[index]); speakup_msgs[index] = speakup_default_msgs[index]; } } - spk_unlock(flags); + spin_unlock_irqrestore(&speakup_info.spinlock, flags); } |