diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/amba-clcd.c | 9 | ||||
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 2 | ||||
-rw-r--r-- | drivers/video/console/vgacon.c | 42 | ||||
-rw-r--r-- | drivers/video/igafb.c | 2 | ||||
-rw-r--r-- | drivers/video/omap/lcd_apollon.c | 2 | ||||
-rw-r--r-- | drivers/video/omap/lcd_h3.c | 2 | ||||
-rw-r--r-- | drivers/video/omap/lcd_inn1610.c | 2 | ||||
-rw-r--r-- | drivers/video/omap/lcd_ldp.c | 2 | ||||
-rw-r--r-- | drivers/video/omap/lcd_osk.c | 2 | ||||
-rw-r--r-- | drivers/video/omap/lcd_overo.c | 2 | ||||
-rw-r--r-- | drivers/video/omap/lcd_palmtt.c | 2 | ||||
-rw-r--r-- | drivers/video/pnx4008/sdum.c | 2 |
12 files changed, 39 insertions, 32 deletions
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index cf03ad067147..2cda6ba0939b 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -447,6 +447,10 @@ static int clcdfb_register(struct clcd_fb *fb) goto out; } + ret = clk_prepare(fb->clk); + if (ret) + goto free_clk; + fb->fb.device = &fb->dev->dev; fb->fb.fix.mmio_start = fb->dev->res.start; @@ -456,7 +460,7 @@ static int clcdfb_register(struct clcd_fb *fb) if (!fb->regs) { printk(KERN_ERR "CLCD: unable to remap registers\n"); ret = -ENOMEM; - goto free_clk; + goto clk_unprep; } fb->fb.fbops = &clcdfb_ops; @@ -530,6 +534,8 @@ static int clcdfb_register(struct clcd_fb *fb) fb_dealloc_cmap(&fb->fb.cmap); unmap: iounmap(fb->regs); + clk_unprep: + clk_unprepare(fb->clk); free_clk: clk_put(fb->clk); out: @@ -595,6 +601,7 @@ static int clcdfb_remove(struct amba_device *dev) if (fb->fb.cmap.len) fb_dealloc_cmap(&fb->fb.cmap); iounmap(fb->regs); + clk_unprepare(fb->clk); clk_put(fb->clk); fb->board->remove(fb); diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 817ab60f7537..dda920623c6a 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -21,7 +21,7 @@ #include <mach/board.h> #include <mach/cpu.h> -#include <mach/gpio.h> +#include <asm/gpio.h> #include <video/atmel_lcdc.h> diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 915fd74da7a2..d449a74d4a31 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -50,7 +50,7 @@ #include <video/vga.h> #include <asm/io.h> -static DEFINE_SPINLOCK(vga_lock); +static DEFINE_RAW_SPINLOCK(vga_lock); static int cursor_size_lastfrom; static int cursor_size_lastto; static u32 vgacon_xres; @@ -157,7 +157,7 @@ static inline void write_vga(unsigned char reg, unsigned int val) * ddprintk might set the console position from interrupt * handlers, thus the write has to be IRQ-atomic. */ - spin_lock_irqsave(&vga_lock, flags); + raw_spin_lock_irqsave(&vga_lock, flags); #ifndef SLOW_VGA v1 = reg + (val & 0xff00); @@ -170,7 +170,7 @@ static inline void write_vga(unsigned char reg, unsigned int val) outb_p(reg + 1, vga_video_port_reg); outb_p(val & 0xff, vga_video_port_val); #endif - spin_unlock_irqrestore(&vga_lock, flags); + raw_spin_unlock_irqrestore(&vga_lock, flags); } static inline void vga_set_mem_top(struct vc_data *c) @@ -664,7 +664,7 @@ static void vgacon_set_cursor_size(int xpos, int from, int to) cursor_size_lastfrom = from; cursor_size_lastto = to; - spin_lock_irqsave(&vga_lock, flags); + raw_spin_lock_irqsave(&vga_lock, flags); if (vga_video_type >= VIDEO_TYPE_VGAC) { outb_p(VGA_CRTC_CURSOR_START, vga_video_port_reg); curs = inb_p(vga_video_port_val); @@ -682,7 +682,7 @@ static void vgacon_set_cursor_size(int xpos, int from, int to) outb_p(curs, vga_video_port_val); outb_p(VGA_CRTC_CURSOR_END, vga_video_port_reg); outb_p(cure, vga_video_port_val); - spin_unlock_irqrestore(&vga_lock, flags); + raw_spin_unlock_irqrestore(&vga_lock, flags); } static void vgacon_cursor(struct vc_data *c, int mode) @@ -757,7 +757,7 @@ static int vgacon_doresize(struct vc_data *c, unsigned int scanlines = height * c->vc_font.height; u8 scanlines_lo = 0, r7 = 0, vsync_end = 0, mode, max_scan; - spin_lock_irqsave(&vga_lock, flags); + raw_spin_lock_irqsave(&vga_lock, flags); vgacon_xres = width * VGA_FONTWIDTH; vgacon_yres = height * c->vc_font.height; @@ -808,7 +808,7 @@ static int vgacon_doresize(struct vc_data *c, outb_p(vsync_end, vga_video_port_val); } - spin_unlock_irqrestore(&vga_lock, flags); + raw_spin_unlock_irqrestore(&vga_lock, flags); return 0; } @@ -891,11 +891,11 @@ static void vga_vesa_blank(struct vgastate *state, int mode) { /* save original values of VGA controller registers */ if (!vga_vesa_blanked) { - spin_lock_irq(&vga_lock); + raw_spin_lock_irq(&vga_lock); vga_state.SeqCtrlIndex = vga_r(state->vgabase, VGA_SEQ_I); vga_state.CrtCtrlIndex = inb_p(vga_video_port_reg); vga_state.CrtMiscIO = vga_r(state->vgabase, VGA_MIS_R); - spin_unlock_irq(&vga_lock); + raw_spin_unlock_irq(&vga_lock); outb_p(0x00, vga_video_port_reg); /* HorizontalTotal */ vga_state.HorizontalTotal = inb_p(vga_video_port_val); @@ -918,7 +918,7 @@ static void vga_vesa_blank(struct vgastate *state, int mode) /* assure that video is enabled */ /* "0x20" is VIDEO_ENABLE_bit in register 01 of sequencer */ - spin_lock_irq(&vga_lock); + raw_spin_lock_irq(&vga_lock); vga_wseq(state->vgabase, VGA_SEQ_CLOCK_MODE, vga_state.ClockingMode | 0x20); /* test for vertical retrace in process.... */ @@ -954,13 +954,13 @@ static void vga_vesa_blank(struct vgastate *state, int mode) /* restore both index registers */ vga_w(state->vgabase, VGA_SEQ_I, vga_state.SeqCtrlIndex); outb_p(vga_state.CrtCtrlIndex, vga_video_port_reg); - spin_unlock_irq(&vga_lock); + raw_spin_unlock_irq(&vga_lock); } static void vga_vesa_unblank(struct vgastate *state) { /* restore original values of VGA controller registers */ - spin_lock_irq(&vga_lock); + raw_spin_lock_irq(&vga_lock); vga_w(state->vgabase, VGA_MIS_W, vga_state.CrtMiscIO); outb_p(0x00, vga_video_port_reg); /* HorizontalTotal */ @@ -985,7 +985,7 @@ static void vga_vesa_unblank(struct vgastate *state) /* restore index/control registers */ vga_w(state->vgabase, VGA_SEQ_I, vga_state.SeqCtrlIndex); outb_p(vga_state.CrtCtrlIndex, vga_video_port_reg); - spin_unlock_irq(&vga_lock); + raw_spin_unlock_irq(&vga_lock); } static void vga_pal_blank(struct vgastate *state) @@ -1104,7 +1104,7 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512) charmap += 4 * cmapsz; #endif - spin_lock_irq(&vga_lock); + raw_spin_lock_irq(&vga_lock); /* First, the Sequencer */ vga_wseq(state->vgabase, VGA_SEQ_RESET, 0x1); /* CPU writes only to map 2 */ @@ -1120,7 +1120,7 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512) vga_wgfx(state->vgabase, VGA_GFX_MODE, 0x00); /* map start at A000:0000 */ vga_wgfx(state->vgabase, VGA_GFX_MISC, 0x00); - spin_unlock_irq(&vga_lock); + raw_spin_unlock_irq(&vga_lock); if (arg) { if (set) @@ -1147,7 +1147,7 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512) } } - spin_lock_irq(&vga_lock); + raw_spin_lock_irq(&vga_lock); /* First, the sequencer, Synchronous reset */ vga_wseq(state->vgabase, VGA_SEQ_RESET, 0x01); /* CPU writes to maps 0 and 1 */ @@ -1186,7 +1186,7 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512) inb_p(video_port_status); vga_wattr(state->vgabase, VGA_AR_ENABLE_DISPLAY, 0); } - spin_unlock_irq(&vga_lock); + raw_spin_unlock_irq(&vga_lock); return 0; } @@ -1211,26 +1211,26 @@ static int vgacon_adjust_height(struct vc_data *vc, unsigned fontheight) registers; they are write-only on EGA, but it appears that they are all don't care bits on EGA, so I guess it doesn't matter. */ - spin_lock_irq(&vga_lock); + raw_spin_lock_irq(&vga_lock); outb_p(0x07, vga_video_port_reg); /* CRTC overflow register */ ovr = inb_p(vga_video_port_val); outb_p(0x09, vga_video_port_reg); /* Font size register */ fsr = inb_p(vga_video_port_val); - spin_unlock_irq(&vga_lock); + raw_spin_unlock_irq(&vga_lock); vde = maxscan & 0xff; /* Vertical display end reg */ ovr = (ovr & 0xbd) + /* Overflow register */ ((maxscan & 0x100) >> 7) + ((maxscan & 0x200) >> 3); fsr = (fsr & 0xe0) + (fontheight - 1); /* Font size register */ - spin_lock_irq(&vga_lock); + raw_spin_lock_irq(&vga_lock); outb_p(0x07, vga_video_port_reg); /* CRTC overflow register */ outb_p(ovr, vga_video_port_val); outb_p(0x09, vga_video_port_reg); /* Font size */ outb_p(fsr, vga_video_port_val); outb_p(0x12, vga_video_port_reg); /* Vertical display limit */ outb_p(vde, vga_video_port_val); - spin_unlock_irq(&vga_lock); + raw_spin_unlock_irq(&vga_lock); vga_video_font_height = fontheight; for (i = 0; i < MAX_NR_CONSOLES; i++) { diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c index d885c770eb84..2d97752f79a5 100644 --- a/drivers/video/igafb.c +++ b/drivers/video/igafb.c @@ -428,7 +428,7 @@ static int __init igafb_init(void) * * IGS2000 has its I/O memory mapped and we want * to generate memory cycles on PCI, e.g. do ioremap(), - * then readb/writeb() as in Documentation/IO-mapping.txt. + * then readb/writeb() as in Documentation/io-mapping.txt. * * IGS1682 is more traditional, it responds to PCI I/O * cycles, so we want to access it with inb()/outb(). diff --git a/drivers/video/omap/lcd_apollon.c b/drivers/video/omap/lcd_apollon.c index 10459d8bd9a0..4b24f549f9b9 100644 --- a/drivers/video/omap/lcd_apollon.c +++ b/drivers/video/omap/lcd_apollon.c @@ -24,7 +24,7 @@ #include <linux/module.h> #include <linux/platform_device.h> -#include <mach/gpio.h> +#include <asm/gpio.h> #include "omapfb.h" diff --git a/drivers/video/omap/lcd_h3.c b/drivers/video/omap/lcd_h3.c index 8df688748b5a..622ad839fd9d 100644 --- a/drivers/video/omap/lcd_h3.c +++ b/drivers/video/omap/lcd_h3.c @@ -23,7 +23,7 @@ #include <linux/platform_device.h> #include <linux/i2c/tps65010.h> -#include <mach/gpio.h> +#include <asm/gpio.h> #include "omapfb.h" #define MODULE_NAME "omapfb-lcd_h3" diff --git a/drivers/video/omap/lcd_inn1610.c b/drivers/video/omap/lcd_inn1610.c index 9fff86f67bde..12cc52a70f96 100644 --- a/drivers/video/omap/lcd_inn1610.c +++ b/drivers/video/omap/lcd_inn1610.c @@ -22,7 +22,7 @@ #include <linux/module.h> #include <linux/platform_device.h> -#include <mach/gpio.h> +#include <asm/gpio.h> #include "omapfb.h" #define MODULE_NAME "omapfb-lcd_h3" diff --git a/drivers/video/omap/lcd_ldp.c b/drivers/video/omap/lcd_ldp.c index 0f5952cae85e..062466402c0e 100644 --- a/drivers/video/omap/lcd_ldp.c +++ b/drivers/video/omap/lcd_ldp.c @@ -26,7 +26,7 @@ #include <linux/delay.h> #include <linux/i2c/twl.h> -#include <mach/gpio.h> +#include <asm/gpio.h> #include <plat/mux.h> #include <asm/mach-types.h> diff --git a/drivers/video/omap/lcd_osk.c b/drivers/video/omap/lcd_osk.c index b87e8b83f29c..6f8d13c41202 100644 --- a/drivers/video/omap/lcd_osk.c +++ b/drivers/video/omap/lcd_osk.c @@ -23,7 +23,7 @@ #include <linux/module.h> #include <linux/platform_device.h> -#include <mach/gpio.h> +#include <asm/gpio.h> #include <plat/mux.h> #include "omapfb.h" diff --git a/drivers/video/omap/lcd_overo.c b/drivers/video/omap/lcd_overo.c index 564933ffac6e..b8fd5b2ec29c 100644 --- a/drivers/video/omap/lcd_overo.c +++ b/drivers/video/omap/lcd_overo.c @@ -23,7 +23,7 @@ #include <linux/platform_device.h> #include <linux/i2c/twl.h> -#include <mach/gpio.h> +#include <asm/gpio.h> #include <plat/mux.h> #include <asm/mach-types.h> diff --git a/drivers/video/omap/lcd_palmtt.c b/drivers/video/omap/lcd_palmtt.c index ff0e6d7ab3a2..b51b332e5a2b 100644 --- a/drivers/video/omap/lcd_palmtt.c +++ b/drivers/video/omap/lcd_palmtt.c @@ -29,7 +29,7 @@ GPIO13 - screen blanking #include <linux/module.h> #include <linux/io.h> -#include <mach/gpio.h> +#include <asm/gpio.h> #include "omapfb.h" static int palmtt_panel_init(struct lcd_panel *panel, diff --git a/drivers/video/pnx4008/sdum.c b/drivers/video/pnx4008/sdum.c index 5ec4f2d439c9..50e00395240f 100644 --- a/drivers/video/pnx4008/sdum.c +++ b/drivers/video/pnx4008/sdum.c @@ -30,7 +30,7 @@ #include <linux/clk.h> #include <linux/gfp.h> #include <asm/uaccess.h> -#include <mach/gpio.h> +#include <asm/gpio.h> #include "sdum.h" #include "fbcommon.h" |