block: fix warning with calling smp_processor_id() in preemptible section
[pandora-kernel.git] / drivers / staging / msm / mddihost_e.c
1 /* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License version 2 and
5  * only version 2 as published by the Free Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17
18 #include <linux/module.h>
19 #include <linux/kernel.h>
20 #include <linux/slab.h>
21 #include <linux/delay.h>
22 #include <linux/mm.h>
23 #include <linux/fb.h>
24 #include <linux/init.h>
25 #include <linux/ioport.h>
26 #include <linux/device.h>
27 #include <linux/dma-mapping.h>
28
29 #include "msm_fb.h"
30 #include "mddihost.h"
31 #include "mddihosti.h"
32
33 #include <linux/clk.h>
34 #include <mach/clk.h>
35
36 extern struct semaphore mddi_host_mutex;
37 static boolean mddi_host_ext_powered = FALSE;
38
39 void mddi_host_start_ext_display(void)
40 {
41         down(&mddi_host_mutex);
42
43         if (!mddi_host_ext_powered) {
44                 mddi_host_init(MDDI_HOST_EXT);
45
46                 mddi_host_ext_powered = TRUE;
47         }
48
49         up(&mddi_host_mutex);
50 }
51
52 void mddi_host_stop_ext_display(void)
53 {
54         down(&mddi_host_mutex);
55
56         if (mddi_host_ext_powered) {
57                 mddi_host_powerdown(MDDI_HOST_EXT);
58
59                 mddi_host_ext_powered = FALSE;
60         }
61
62         up(&mddi_host_mutex);
63 }