brcm2708: update 4.1 patches
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.1 / 0083-bcm2708-vcio-Remove-restriction-of-only-a-single-ins.patch
1 From 9fa64d590a4f206f604b4b78bf61fc17c94e1d5d Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Fri, 26 Jun 2015 17:37:38 +0100
4 Subject: [PATCH 083/148] bcm2708-vcio: Remove restriction of only a single
5 instance being open
6
7 We need more than one process to be able to use mailbox interface (e.g. HW cursor in fbturbo and hello_fft).
8 Locking should be handled on each mailbox access
9 ---
10 drivers/mailbox/bcm2708-vcio.c | 14 --------------
11 1 file changed, 14 deletions(-)
12
13 --- a/drivers/mailbox/bcm2708-vcio.c
14 +++ b/drivers/mailbox/bcm2708-vcio.c
15 @@ -242,20 +242,9 @@ EXPORT_SYMBOL_GPL(bcm_mailbox_property);
16
17 /* Platform Device for Mailbox */
18
19 -/*
20 - * Is the device open right now? Used to prevent
21 - * concurent access into the same device
22 - */
23 -static bool device_is_open;
24 -
25 /* This is called whenever a process attempts to open the device file */
26 static int device_open(struct inode *inode, struct file *file)
27 {
28 - /* We don't want to talk to two processes at the same time */
29 - if (device_is_open)
30 - return -EBUSY;
31 -
32 - device_is_open = true;
33 try_module_get(THIS_MODULE);
34
35 return 0;
36 @@ -263,9 +252,6 @@ static int device_open(struct inode *ino
37
38 static int device_release(struct inode *inode, struct file *file)
39 {
40 - /* We're now ready for our next caller */
41 - device_is_open = false;
42 -
43 module_put(THIS_MODULE);
44
45 return 0;