diff options
author | Alessio Igor Bogani <abogani@texware.it> | 2009-03-31 18:25:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 11:59:34 -0400 |
commit | 98da329581e3e6a08eba418ba6da64c05bacd029 (patch) | |
tree | 5e0377ffb0b9f9146db63feeb8a2b94876ba9a85 /drivers/video | |
parent | 18b41f1cd537168a886c43237297692ba8d0a143 (diff) |
nvidiafb: remove open_lock mutex
Remove mutex from the nvidiafb_open/nvidiafb_release functions as these
operations are mutexed at fb layer.
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/nvidia/nv_type.h | 2 | ||||
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 7 |
2 files changed, 0 insertions, 9 deletions
diff --git a/drivers/video/nvidia/nv_type.h b/drivers/video/nvidia/nv_type.h index f132aab8c5d..c03f7f55c76 100644 --- a/drivers/video/nvidia/nv_type.h +++ b/drivers/video/nvidia/nv_type.h | |||
@@ -5,7 +5,6 @@ | |||
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/i2c.h> | 6 | #include <linux/i2c.h> |
7 | #include <linux/i2c-algo-bit.h> | 7 | #include <linux/i2c-algo-bit.h> |
8 | #include <linux/mutex.h> | ||
9 | #include <video/vga.h> | 8 | #include <video/vga.h> |
10 | 9 | ||
11 | #define NV_ARCH_04 0x04 | 10 | #define NV_ARCH_04 0x04 |
@@ -99,7 +98,6 @@ struct nvidia_par { | |||
99 | RIVA_HW_STATE initial_state; | 98 | RIVA_HW_STATE initial_state; |
100 | RIVA_HW_STATE *CurrentState; | 99 | RIVA_HW_STATE *CurrentState; |
101 | struct vgastate vgastate; | 100 | struct vgastate vgastate; |
102 | struct mutex open_lock; | ||
103 | u32 pseudo_palette[16]; | 101 | u32 pseudo_palette[16]; |
104 | struct pci_dev *pci_dev; | 102 | struct pci_dev *pci_dev; |
105 | u32 Architecture; | 103 | u32 Architecture; |
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index 9dbb5a5a267..efe10ff86d6 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c | |||
@@ -1004,15 +1004,12 @@ static int nvidiafb_open(struct fb_info *info, int user) | |||
1004 | { | 1004 | { |
1005 | struct nvidia_par *par = info->par; | 1005 | struct nvidia_par *par = info->par; |
1006 | 1006 | ||
1007 | mutex_lock(&par->open_lock); | ||
1008 | |||
1009 | if (!par->open_count) { | 1007 | if (!par->open_count) { |
1010 | save_vga_x86(par); | 1008 | save_vga_x86(par); |
1011 | nvidia_save_vga(par, &par->initial_state); | 1009 | nvidia_save_vga(par, &par->initial_state); |
1012 | } | 1010 | } |
1013 | 1011 | ||
1014 | par->open_count++; | 1012 | par->open_count++; |
1015 | mutex_unlock(&par->open_lock); | ||
1016 | return 0; | 1013 | return 0; |
1017 | } | 1014 | } |
1018 | 1015 | ||
@@ -1021,8 +1018,6 @@ static int nvidiafb_release(struct fb_info *info, int user) | |||
1021 | struct nvidia_par *par = info->par; | 1018 | struct nvidia_par *par = info->par; |
1022 | int err = 0; | 1019 | int err = 0; |
1023 | 1020 | ||
1024 | mutex_lock(&par->open_lock); | ||
1025 | |||
1026 | if (!par->open_count) { | 1021 | if (!par->open_count) { |
1027 | err = -EINVAL; | 1022 | err = -EINVAL; |
1028 | goto done; | 1023 | goto done; |
@@ -1035,7 +1030,6 @@ static int nvidiafb_release(struct fb_info *info, int user) | |||
1035 | 1030 | ||
1036 | par->open_count--; | 1031 | par->open_count--; |
1037 | done: | 1032 | done: |
1038 | mutex_unlock(&par->open_lock); | ||
1039 | return err; | 1033 | return err; |
1040 | } | 1034 | } |
1041 | 1035 | ||
@@ -1300,7 +1294,6 @@ static int __devinit nvidiafb_probe(struct pci_dev *pd, | |||
1300 | 1294 | ||
1301 | par = info->par; | 1295 | par = info->par; |
1302 | par->pci_dev = pd; | 1296 | par->pci_dev = pd; |
1303 | mutex_init(&par->open_lock); | ||
1304 | info->pixmap.addr = kzalloc(8 * 1024, GFP_KERNEL); | 1297 | info->pixmap.addr = kzalloc(8 * 1024, GFP_KERNEL); |
1305 | 1298 | ||
1306 | if (info->pixmap.addr == NULL) | 1299 | if (info->pixmap.addr == NULL) |