Messages in this thread Patch in this message |  | | | Date | Sun, 15 Apr 2007 12:54:44 +0200 | | From | Jean Delvare <> | | Subject | [PATCH] Clean up mutex_trylock noise |
| |
Ingo Molnar's semaphore to mutex conversions left some noise on a few trylock calls. Clean it up.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ingo Molnar <mingo@elte.hu> --- drivers/media/video/zoran_driver.c | 2 +- drivers/mtd/mtd_blkdevs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) --- linux-2.6.21-rc6.orig/drivers/media/video/zoran_driver.c 2007-04-14 16:00:12.000000000 +0200 +++ linux-2.6.21-rc6/drivers/media/video/zoran_driver.c 2007-04-15 12:47:37.000000000 +0200 @@ -2034,7 +2034,7 @@ zoran_do_ioctl (struct inode *inode, * but moving the free code outside the munmap() handler fixes * all this... If someone knows why, please explain me (Ronald) */ - if (!!mutex_trylock(&zr->resource_lock)) { + if (mutex_trylock(&zr->resource_lock)) { /* we obtained it! Let's try to free some things */ if (fh->jpg_buffers.ready_to_be_freed) jpg_fbuffer_free(file); --- linux-2.6.21-rc6.orig/drivers/mtd/mtd_blkdevs.c 2007-02-04 19:44:54.000000000 +0100 +++ linux-2.6.21-rc6/drivers/mtd/mtd_blkdevs.c 2007-04-15 12:47:26.000000000 +0200 @@ -236,7 +236,7 @@ int add_mtd_blktrans_dev(struct mtd_blkt int last_devnum = -1; struct gendisk *gd; - if (!!mutex_trylock(&mtd_table_mutex)) { + if (mutex_trylock(&mtd_table_mutex)) { mutex_unlock(&mtd_table_mutex); BUG(); } @@ -314,7 +314,7 @@ int add_mtd_blktrans_dev(struct mtd_blkt int del_mtd_blktrans_dev(struct mtd_blktrans_dev *old) { - if (!!mutex_trylock(&mtd_table_mutex)) { + if (mutex_trylock(&mtd_table_mutex)) { mutex_unlock(&mtd_table_mutex); BUG(); }
-- Jean Delvare - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |