diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 2 | ||||
-rw-r--r-- | drivers/video/backlight/da903x.c | 2 | ||||
-rw-r--r-- | drivers/video/backlight/lcd.c | 11 | ||||
-rw-r--r-- | drivers/video/cirrusfb.c | 3 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 2 | ||||
-rw-r--r-- | drivers/video/pxafb.c | 5 | ||||
-rw-r--r-- | drivers/video/tmiofb.c | 10 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.c | 17 |
8 files changed, 32 insertions, 20 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index f8d0a57a07cb..9a577a800db5 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -132,7 +132,7 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo) | |||
132 | 132 | ||
133 | bl = backlight_device_register("backlight", &sinfo->pdev->dev, | 133 | bl = backlight_device_register("backlight", &sinfo->pdev->dev, |
134 | sinfo, &atmel_lcdc_bl_ops); | 134 | sinfo, &atmel_lcdc_bl_ops); |
135 | if (IS_ERR(sinfo->backlight)) { | 135 | if (IS_ERR(bl)) { |
136 | dev_err(&sinfo->pdev->dev, "error %ld on backlight register\n", | 136 | dev_err(&sinfo->pdev->dev, "error %ld on backlight register\n", |
137 | PTR_ERR(bl)); | 137 | PTR_ERR(bl)); |
138 | return; | 138 | return; |
diff --git a/drivers/video/backlight/da903x.c b/drivers/video/backlight/da903x.c index 242c38250166..93bb4340cc64 100644 --- a/drivers/video/backlight/da903x.c +++ b/drivers/video/backlight/da903x.c | |||
@@ -119,6 +119,7 @@ static int da903x_backlight_probe(struct platform_device *pdev) | |||
119 | default: | 119 | default: |
120 | dev_err(&pdev->dev, "invalid backlight device ID(%d)\n", | 120 | dev_err(&pdev->dev, "invalid backlight device ID(%d)\n", |
121 | pdev->id); | 121 | pdev->id); |
122 | kfree(data); | ||
122 | return -EINVAL; | 123 | return -EINVAL; |
123 | } | 124 | } |
124 | 125 | ||
@@ -130,6 +131,7 @@ static int da903x_backlight_probe(struct platform_device *pdev) | |||
130 | data, &da903x_backlight_ops); | 131 | data, &da903x_backlight_ops); |
131 | if (IS_ERR(bl)) { | 132 | if (IS_ERR(bl)) { |
132 | dev_err(&pdev->dev, "failed to register backlight\n"); | 133 | dev_err(&pdev->dev, "failed to register backlight\n"); |
134 | kfree(data); | ||
133 | return PTR_ERR(bl); | 135 | return PTR_ERR(bl); |
134 | } | 136 | } |
135 | 137 | ||
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index 8e1731d3b228..680e57b616cd 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c | |||
@@ -42,10 +42,13 @@ static int fb_notifier_callback(struct notifier_block *self, | |||
42 | 42 | ||
43 | mutex_lock(&ld->ops_lock); | 43 | mutex_lock(&ld->ops_lock); |
44 | if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) { | 44 | if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) { |
45 | if (event == FB_EVENT_BLANK) | 45 | if (event == FB_EVENT_BLANK) { |
46 | ld->ops->set_power(ld, *(int *)evdata->data); | 46 | if (ld->ops->set_power) |
47 | else | 47 | ld->ops->set_power(ld, *(int *)evdata->data); |
48 | ld->ops->set_mode(ld, evdata->data); | 48 | } else { |
49 | if (ld->ops->set_mode) | ||
50 | ld->ops->set_mode(ld, evdata->data); | ||
51 | } | ||
49 | } | 52 | } |
50 | mutex_unlock(&ld->ops_lock); | 53 | mutex_unlock(&ld->ops_lock); |
51 | return 0; | 54 | return 0; |
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index 8a8760230bc7..a2aa6ddffbe2 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
@@ -2462,8 +2462,7 @@ static int __init cirrusfb_init(void) | |||
2462 | 2462 | ||
2463 | #ifndef MODULE | 2463 | #ifndef MODULE |
2464 | static int __init cirrusfb_setup(char *options) { | 2464 | static int __init cirrusfb_setup(char *options) { |
2465 | char *this_opt, s[32]; | 2465 | char *this_opt; |
2466 | int i; | ||
2467 | 2466 | ||
2468 | DPRINTK("ENTER\n"); | 2467 | DPRINTK("ENTER\n"); |
2469 | 2468 | ||
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 1d5ae39cb271..3c65b0d67617 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -230,7 +230,7 @@ static void fb_set_logo_directpalette(struct fb_info *info, | |||
230 | greenshift = info->var.green.offset; | 230 | greenshift = info->var.green.offset; |
231 | blueshift = info->var.blue.offset; | 231 | blueshift = info->var.blue.offset; |
232 | 232 | ||
233 | for (i = 32; i < logo->clutsize; i++) | 233 | for (i = 32; i < 32 + logo->clutsize; i++) |
234 | palette[i] = i << redshift | i << greenshift | i << blueshift; | 234 | palette[i] = i << redshift | i << greenshift | i << blueshift; |
235 | } | 235 | } |
236 | 236 | ||
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 97204497d9f7..cc59c52e1103 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -804,6 +804,9 @@ static int pxafb_smart_thread(void *arg) | |||
804 | 804 | ||
805 | static int pxafb_smart_init(struct pxafb_info *fbi) | 805 | static int pxafb_smart_init(struct pxafb_info *fbi) |
806 | { | 806 | { |
807 | if (!(fbi->lccr0 | LCCR0_LCDT)) | ||
808 | return 0; | ||
809 | |||
807 | fbi->smart_thread = kthread_run(pxafb_smart_thread, fbi, | 810 | fbi->smart_thread = kthread_run(pxafb_smart_thread, fbi, |
808 | "lcd_refresh"); | 811 | "lcd_refresh"); |
809 | if (IS_ERR(fbi->smart_thread)) { | 812 | if (IS_ERR(fbi->smart_thread)) { |
@@ -1372,7 +1375,7 @@ static void pxafb_decode_mach_info(struct pxafb_info *fbi, | |||
1372 | fbi->cmap_inverse = inf->cmap_inverse; | 1375 | fbi->cmap_inverse = inf->cmap_inverse; |
1373 | fbi->cmap_static = inf->cmap_static; | 1376 | fbi->cmap_static = inf->cmap_static; |
1374 | 1377 | ||
1375 | switch (lcd_conn & 0xf) { | 1378 | switch (lcd_conn & LCD_TYPE_MASK) { |
1376 | case LCD_TYPE_MONO_STN: | 1379 | case LCD_TYPE_MONO_STN: |
1377 | fbi->lccr0 = LCCR0_CMS; | 1380 | fbi->lccr0 = LCCR0_CMS; |
1378 | break; | 1381 | break; |
diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c index 2a380011e9ba..7baf2dd12d50 100644 --- a/drivers/video/tmiofb.c +++ b/drivers/video/tmiofb.c | |||
@@ -222,6 +222,9 @@ static irqreturn_t tmiofb_irq(int irq, void *__info) | |||
222 | unsigned int bbisc = tmio_ioread16(par->lcr + LCR_BBISC); | 222 | unsigned int bbisc = tmio_ioread16(par->lcr + LCR_BBISC); |
223 | 223 | ||
224 | 224 | ||
225 | tmio_iowrite16(bbisc, par->lcr + LCR_BBISC); | ||
226 | |||
227 | #ifdef CONFIG_FB_TMIO_ACCELL | ||
225 | /* | 228 | /* |
226 | * We were in polling mode and now we got correct irq. | 229 | * We were in polling mode and now we got correct irq. |
227 | * Switch back to IRQ-based sync of command FIFO | 230 | * Switch back to IRQ-based sync of command FIFO |
@@ -231,9 +234,6 @@ static irqreturn_t tmiofb_irq(int irq, void *__info) | |||
231 | par->use_polling = false; | 234 | par->use_polling = false; |
232 | } | 235 | } |
233 | 236 | ||
234 | tmio_iowrite16(bbisc, par->lcr + LCR_BBISC); | ||
235 | |||
236 | #ifdef CONFIG_FB_TMIO_ACCELL | ||
237 | if (bbisc & 1) | 237 | if (bbisc & 1) |
238 | wake_up(&par->wait_acc); | 238 | wake_up(&par->wait_acc); |
239 | #endif | 239 | #endif |
@@ -938,7 +938,9 @@ static void tmiofb_dump_regs(struct platform_device *dev) | |||
938 | static int tmiofb_suspend(struct platform_device *dev, pm_message_t state) | 938 | static int tmiofb_suspend(struct platform_device *dev, pm_message_t state) |
939 | { | 939 | { |
940 | struct fb_info *info = platform_get_drvdata(dev); | 940 | struct fb_info *info = platform_get_drvdata(dev); |
941 | #ifdef CONFIG_FB_TMIO_ACCELL | ||
941 | struct tmiofb_par *par = info->par; | 942 | struct tmiofb_par *par = info->par; |
943 | #endif | ||
942 | struct mfd_cell *cell = dev->dev.platform_data; | 944 | struct mfd_cell *cell = dev->dev.platform_data; |
943 | int retval = 0; | 945 | int retval = 0; |
944 | 946 | ||
@@ -950,12 +952,14 @@ static int tmiofb_suspend(struct platform_device *dev, pm_message_t state) | |||
950 | info->fbops->fb_sync(info); | 952 | info->fbops->fb_sync(info); |
951 | 953 | ||
952 | 954 | ||
955 | #ifdef CONFIG_FB_TMIO_ACCELL | ||
953 | /* | 956 | /* |
954 | * The fb should be usable even if interrupts are disabled (and they are | 957 | * The fb should be usable even if interrupts are disabled (and they are |
955 | * during suspend/resume). Switch temporary to forced polling. | 958 | * during suspend/resume). Switch temporary to forced polling. |
956 | */ | 959 | */ |
957 | printk(KERN_INFO "tmiofb: switching to polling\n"); | 960 | printk(KERN_INFO "tmiofb: switching to polling\n"); |
958 | par->use_polling = true; | 961 | par->use_polling = true; |
962 | #endif | ||
959 | tmiofb_hw_stop(dev); | 963 | tmiofb_hw_stop(dev); |
960 | 964 | ||
961 | if (cell->suspend) | 965 | if (cell->suspend) |
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 0132eae06f55..73ac754ad801 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
@@ -2036,30 +2036,30 @@ static int viafb_vt1636_proc_write(struct file *file, | |||
2036 | return count; | 2036 | return count; |
2037 | } | 2037 | } |
2038 | 2038 | ||
2039 | static void viafb_init_proc(struct proc_dir_entry *viafb_entry) | 2039 | static void viafb_init_proc(struct proc_dir_entry **viafb_entry) |
2040 | { | 2040 | { |
2041 | struct proc_dir_entry *entry; | 2041 | struct proc_dir_entry *entry; |
2042 | viafb_entry = proc_mkdir("viafb", NULL); | 2042 | *viafb_entry = proc_mkdir("viafb", NULL); |
2043 | if (viafb_entry) { | 2043 | if (viafb_entry) { |
2044 | entry = create_proc_entry("dvp0", 0, viafb_entry); | 2044 | entry = create_proc_entry("dvp0", 0, *viafb_entry); |
2045 | if (entry) { | 2045 | if (entry) { |
2046 | entry->owner = THIS_MODULE; | 2046 | entry->owner = THIS_MODULE; |
2047 | entry->read_proc = viafb_dvp0_proc_read; | 2047 | entry->read_proc = viafb_dvp0_proc_read; |
2048 | entry->write_proc = viafb_dvp0_proc_write; | 2048 | entry->write_proc = viafb_dvp0_proc_write; |
2049 | } | 2049 | } |
2050 | entry = create_proc_entry("dvp1", 0, viafb_entry); | 2050 | entry = create_proc_entry("dvp1", 0, *viafb_entry); |
2051 | if (entry) { | 2051 | if (entry) { |
2052 | entry->owner = THIS_MODULE; | 2052 | entry->owner = THIS_MODULE; |
2053 | entry->read_proc = viafb_dvp1_proc_read; | 2053 | entry->read_proc = viafb_dvp1_proc_read; |
2054 | entry->write_proc = viafb_dvp1_proc_write; | 2054 | entry->write_proc = viafb_dvp1_proc_write; |
2055 | } | 2055 | } |
2056 | entry = create_proc_entry("dfph", 0, viafb_entry); | 2056 | entry = create_proc_entry("dfph", 0, *viafb_entry); |
2057 | if (entry) { | 2057 | if (entry) { |
2058 | entry->owner = THIS_MODULE; | 2058 | entry->owner = THIS_MODULE; |
2059 | entry->read_proc = viafb_dfph_proc_read; | 2059 | entry->read_proc = viafb_dfph_proc_read; |
2060 | entry->write_proc = viafb_dfph_proc_write; | 2060 | entry->write_proc = viafb_dfph_proc_write; |
2061 | } | 2061 | } |
2062 | entry = create_proc_entry("dfpl", 0, viafb_entry); | 2062 | entry = create_proc_entry("dfpl", 0, *viafb_entry); |
2063 | if (entry) { | 2063 | if (entry) { |
2064 | entry->owner = THIS_MODULE; | 2064 | entry->owner = THIS_MODULE; |
2065 | entry->read_proc = viafb_dfpl_proc_read; | 2065 | entry->read_proc = viafb_dfpl_proc_read; |
@@ -2068,7 +2068,7 @@ static void viafb_init_proc(struct proc_dir_entry *viafb_entry) | |||
2068 | if (VT1636_LVDS == viaparinfo->chip_info->lvds_chip_info. | 2068 | if (VT1636_LVDS == viaparinfo->chip_info->lvds_chip_info. |
2069 | lvds_chip_name || VT1636_LVDS == | 2069 | lvds_chip_name || VT1636_LVDS == |
2070 | viaparinfo->chip_info->lvds_chip_info2.lvds_chip_name) { | 2070 | viaparinfo->chip_info->lvds_chip_info2.lvds_chip_name) { |
2071 | entry = create_proc_entry("vt1636", 0, viafb_entry); | 2071 | entry = create_proc_entry("vt1636", 0, *viafb_entry); |
2072 | if (entry) { | 2072 | if (entry) { |
2073 | entry->owner = THIS_MODULE; | 2073 | entry->owner = THIS_MODULE; |
2074 | entry->read_proc = viafb_vt1636_proc_read; | 2074 | entry->read_proc = viafb_vt1636_proc_read; |
@@ -2087,6 +2087,7 @@ static void viafb_remove_proc(struct proc_dir_entry *viafb_entry) | |||
2087 | remove_proc_entry("dfpl", viafb_entry); | 2087 | remove_proc_entry("dfpl", viafb_entry); |
2088 | remove_proc_entry("vt1636", viafb_entry); | 2088 | remove_proc_entry("vt1636", viafb_entry); |
2089 | remove_proc_entry("vt1625", viafb_entry); | 2089 | remove_proc_entry("vt1625", viafb_entry); |
2090 | remove_proc_entry("viafb", NULL); | ||
2090 | } | 2091 | } |
2091 | 2092 | ||
2092 | static int __devinit via_pci_probe(void) | 2093 | static int __devinit via_pci_probe(void) |
@@ -2348,7 +2349,7 @@ static int __devinit via_pci_probe(void) | |||
2348 | viafbinfo->node, viafbinfo->fix.id, default_var.xres, | 2349 | viafbinfo->node, viafbinfo->fix.id, default_var.xres, |
2349 | default_var.yres, default_var.bits_per_pixel); | 2350 | default_var.yres, default_var.bits_per_pixel); |
2350 | 2351 | ||
2351 | viafb_init_proc(viaparinfo->proc_entry); | 2352 | viafb_init_proc(&viaparinfo->proc_entry); |
2352 | viafb_init_dac(IGA2); | 2353 | viafb_init_dac(IGA2); |
2353 | return 0; | 2354 | return 0; |
2354 | } | 2355 | } |