Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alessio Igor Bogani and committed by
Linus Torvalds
98da3295 18b41f1c

-9
-2
drivers/video/nvidia/nv_type.h
··· 5 5 #include <linux/types.h> 6 6 #include <linux/i2c.h> 7 7 #include <linux/i2c-algo-bit.h> 8 - #include <linux/mutex.h> 9 8 #include <video/vga.h> 10 9 11 10 #define NV_ARCH_04 0x04 ··· 98 99 RIVA_HW_STATE initial_state; 99 100 RIVA_HW_STATE *CurrentState; 100 101 struct vgastate vgastate; 101 - struct mutex open_lock; 102 102 u32 pseudo_palette[16]; 103 103 struct pci_dev *pci_dev; 104 104 u32 Architecture;
-7
drivers/video/nvidia/nvidia.c
··· 1004 1004 { 1005 1005 struct nvidia_par *par = info->par; 1006 1006 1007 - mutex_lock(&par->open_lock); 1008 - 1009 1007 if (!par->open_count) { 1010 1008 save_vga_x86(par); 1011 1009 nvidia_save_vga(par, &par->initial_state); 1012 1010 } 1013 1011 1014 1012 par->open_count++; 1015 - mutex_unlock(&par->open_lock); 1016 1013 return 0; 1017 1014 } 1018 1015 ··· 1017 1020 { 1018 1021 struct nvidia_par *par = info->par; 1019 1022 int err = 0; 1020 - 1021 - mutex_lock(&par->open_lock); 1022 1023 1023 1024 if (!par->open_count) { 1024 1025 err = -EINVAL; ··· 1030 1035 1031 1036 par->open_count--; 1032 1037 done: 1033 - mutex_unlock(&par->open_lock); 1034 1038 return err; 1035 1039 } 1036 1040 ··· 1294 1300 1295 1301 par = info->par; 1296 1302 par->pci_dev = pd; 1297 - mutex_init(&par->open_lock); 1298 1303 info->pixmap.addr = kzalloc(8 * 1024, GFP_KERNEL); 1299 1304 1300 1305 if (info->pixmap.addr == NULL)