aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/edac/Kconfig18
-rw-r--r--drivers/edac/edac_mc.c12
-rw-r--r--drivers/firmware/dcdbas.c8
-rw-r--r--drivers/input/mouse/psmouse-base.c2
-rw-r--r--drivers/md/raid1.c13
-rw-r--r--drivers/misc/ibmasm/ibmasm.h9
-rw-r--r--drivers/pcmcia/ds.c2
-rw-r--r--drivers/s390/block/dasd_proc.c2
-rw-r--r--drivers/serial/ioc4_serial.c6
-rw-r--r--drivers/video/arcfb.c5
-rw-r--r--drivers/video/aty/aty128fb.c7
-rw-r--r--drivers/video/aty/radeon_monitor.c4
-rw-r--r--drivers/video/backlight/backlight.c2
-rw-r--r--drivers/video/backlight/lcd.c2
-rw-r--r--drivers/video/imsttfb.c2
-rw-r--r--drivers/video/intelfb/intelfbdrv.c50
-rw-r--r--drivers/video/kyro/STG4000VTG.c2
-rw-r--r--drivers/video/neofb.c4
-rw-r--r--drivers/video/s1d13xxxfb.c3
-rw-r--r--drivers/video/savage/savagefb_driver.c2
-rw-r--r--drivers/video/tdfxfb.c42
21 files changed, 115 insertions, 82 deletions
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index 18a455651121..52f3eb45d2b9 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -6,17 +6,29 @@
6# $Id: Kconfig,v 1.4.2.7 2005/07/08 22:05:38 dsp_llnl Exp $ 6# $Id: Kconfig,v 1.4.2.7 2005/07/08 22:05:38 dsp_llnl Exp $
7# 7#
8 8
9menu 'EDAC - error detection and reporting (RAS)' 9menu 'EDAC - error detection and reporting (RAS) (EXPERIMENTAL)'
10 10
11config EDAC 11config EDAC
12 tristate "EDAC core system error reporting" 12 tristate "EDAC core system error reporting (EXPERIMENTAL)"
13 depends on X86 13 depends on X86 && EXPERIMENTAL
14 help 14 help
15 EDAC is designed to report errors in the core system. 15 EDAC is designed to report errors in the core system.
16 These are low-level errors that are reported in the CPU or 16 These are low-level errors that are reported in the CPU or
17 supporting chipset: memory errors, cache errors, PCI errors, 17 supporting chipset: memory errors, cache errors, PCI errors,
18 thermal throttling, etc.. If unsure, select 'Y'. 18 thermal throttling, etc.. If unsure, select 'Y'.
19 19
20 If this code is reporting problems on your system, please
21 see the EDAC project web pages for more information at:
22
23 <http://bluesmoke.sourceforge.net/>
24
25 and:
26
27 <http://buttersideup.com/edacwiki>
28
29 There is also a mailing list for the EDAC project, which can
30 be found via the sourceforge page.
31
20 32
21comment "Reporting subsystems" 33comment "Reporting subsystems"
22 depends on EDAC 34 depends on EDAC
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index b10ee4698b1d..262e44544dc8 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -132,11 +132,13 @@ static struct kobject edac_pci_kobj;
132 * /sys/devices/system/edac/mc; 132 * /sys/devices/system/edac/mc;
133 * data structures and methods 133 * data structures and methods
134 */ 134 */
135#if 0
135static ssize_t memctrl_string_show(void *ptr, char *buffer) 136static ssize_t memctrl_string_show(void *ptr, char *buffer)
136{ 137{
137 char *value = (char*) ptr; 138 char *value = (char*) ptr;
138 return sprintf(buffer, "%s\n", value); 139 return sprintf(buffer, "%s\n", value);
139} 140}
141#endif
140 142
141static ssize_t memctrl_int_show(void *ptr, char *buffer) 143static ssize_t memctrl_int_show(void *ptr, char *buffer)
142{ 144{
@@ -207,7 +209,9 @@ struct memctrl_dev_attribute attr_##_name = { \
207}; 209};
208 210
209/* cwrow<id> attribute f*/ 211/* cwrow<id> attribute f*/
212#if 0
210MEMCTRL_STRING_ATTR(mc_version,EDAC_MC_VERSION,S_IRUGO,memctrl_string_show,NULL); 213MEMCTRL_STRING_ATTR(mc_version,EDAC_MC_VERSION,S_IRUGO,memctrl_string_show,NULL);
214#endif
211 215
212/* csrow<id> control files */ 216/* csrow<id> control files */
213MEMCTRL_ATTR(panic_on_ue,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store); 217MEMCTRL_ATTR(panic_on_ue,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store);
@@ -222,7 +226,6 @@ static struct memctrl_dev_attribute *memctrl_attr[] = {
222 &attr_log_ue, 226 &attr_log_ue,
223 &attr_log_ce, 227 &attr_log_ce,
224 &attr_poll_msec, 228 &attr_poll_msec,
225 &attr_mc_version,
226 NULL, 229 NULL,
227}; 230};
228 231
@@ -309,6 +312,8 @@ struct list_control {
309 int *count; 312 int *count;
310}; 313};
311 314
315
316#if 0
312/* Output the list as: vendor_id:device:id<,vendor_id:device_id> */ 317/* Output the list as: vendor_id:device:id<,vendor_id:device_id> */
313static ssize_t edac_pci_list_string_show(void *ptr, char *buffer) 318static ssize_t edac_pci_list_string_show(void *ptr, char *buffer)
314{ 319{
@@ -430,6 +435,7 @@ static ssize_t edac_pci_list_string_store(void *ptr, const char *buffer,
430 return count; 435 return count;
431} 436}
432 437
438#endif
433static ssize_t edac_pci_int_show(void *ptr, char *buffer) 439static ssize_t edac_pci_int_show(void *ptr, char *buffer)
434{ 440{
435 int *value = ptr; 441 int *value = ptr;
@@ -498,6 +504,7 @@ struct edac_pci_dev_attribute edac_pci_attr_##_name = { \
498 .store = _store, \ 504 .store = _store, \
499}; 505};
500 506
507#if 0
501static struct list_control pci_whitelist_control = { 508static struct list_control pci_whitelist_control = {
502 .list = pci_whitelist, 509 .list = pci_whitelist,
503 .count = &pci_whitelist_count 510 .count = &pci_whitelist_count
@@ -520,6 +527,7 @@ EDAC_PCI_STRING_ATTR(pci_parity_blacklist,
520 S_IRUGO|S_IWUSR, 527 S_IRUGO|S_IWUSR,
521 edac_pci_list_string_show, 528 edac_pci_list_string_show,
522 edac_pci_list_string_store); 529 edac_pci_list_string_store);
530#endif
523 531
524/* PCI Parity control files */ 532/* PCI Parity control files */
525EDAC_PCI_ATTR(check_pci_parity,S_IRUGO|S_IWUSR,edac_pci_int_show,edac_pci_int_store); 533EDAC_PCI_ATTR(check_pci_parity,S_IRUGO|S_IWUSR,edac_pci_int_show,edac_pci_int_store);
@@ -531,8 +539,6 @@ static struct edac_pci_dev_attribute *edac_pci_attr[] = {
531 &edac_pci_attr_check_pci_parity, 539 &edac_pci_attr_check_pci_parity,
532 &edac_pci_attr_panic_on_pci_parity, 540 &edac_pci_attr_panic_on_pci_parity,
533 &edac_pci_attr_pci_parity_count, 541 &edac_pci_attr_pci_parity_count,
534 &edac_pci_attr_pci_parity_whitelist,
535 &edac_pci_attr_pci_parity_blacklist,
536 NULL, 542 NULL,
537}; 543};
538 544
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c
index 8ed6ddbb9c5d..4652512f7d1a 100644
--- a/drivers/firmware/dcdbas.c
+++ b/drivers/firmware/dcdbas.c
@@ -39,7 +39,7 @@
39#include "dcdbas.h" 39#include "dcdbas.h"
40 40
41#define DRIVER_NAME "dcdbas" 41#define DRIVER_NAME "dcdbas"
42#define DRIVER_VERSION "5.6.0-1" 42#define DRIVER_VERSION "5.6.0-2"
43#define DRIVER_DESCRIPTION "Dell Systems Management Base Driver" 43#define DRIVER_DESCRIPTION "Dell Systems Management Base Driver"
44 44
45static struct platform_device *dcdbas_pdev; 45static struct platform_device *dcdbas_pdev;
@@ -581,9 +581,13 @@ static int __init dcdbas_init(void)
581 */ 581 */
582static void __exit dcdbas_exit(void) 582static void __exit dcdbas_exit(void)
583{ 583{
584 platform_device_unregister(dcdbas_pdev); 584 /*
585 * make sure functions that use dcdbas_pdev are called
586 * before platform_device_unregister
587 */
585 unregister_reboot_notifier(&dcdbas_reboot_nb); 588 unregister_reboot_notifier(&dcdbas_reboot_nb);
586 smi_data_buf_free(); 589 smi_data_buf_free();
590 platform_device_unregister(dcdbas_pdev);
587} 591}
588 592
589module_init(dcdbas_init); 593module_init(dcdbas_init);
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index 19b1b0121726..ad6217467676 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -58,7 +58,7 @@ static unsigned int psmouse_resetafter = 5;
58module_param_named(resetafter, psmouse_resetafter, uint, 0644); 58module_param_named(resetafter, psmouse_resetafter, uint, 0644);
59MODULE_PARM_DESC(resetafter, "Reset device after so many bad packets (0 = never)."); 59MODULE_PARM_DESC(resetafter, "Reset device after so many bad packets (0 = never).");
60 60
61static unsigned int psmouse_resync_time = 5; 61static unsigned int psmouse_resync_time;
62module_param_named(resync_time, psmouse_resync_time, uint, 0644); 62module_param_named(resync_time, psmouse_resync_time, uint, 0644);
63MODULE_PARM_DESC(resync_time, "How long can mouse stay idle before forcing resync (in seconds, 0 = never)."); 63MODULE_PARM_DESC(resync_time, "How long can mouse stay idle before forcing resync (in seconds, 0 = never).");
64 64
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index d39f584cd8b3..5d88329e3c7a 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -306,6 +306,7 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
306 r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); 306 r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private);
307 int mirror, behind = test_bit(R1BIO_BehindIO, &r1_bio->state); 307 int mirror, behind = test_bit(R1BIO_BehindIO, &r1_bio->state);
308 conf_t *conf = mddev_to_conf(r1_bio->mddev); 308 conf_t *conf = mddev_to_conf(r1_bio->mddev);
309 struct bio *to_put = NULL;
309 310
310 if (bio->bi_size) 311 if (bio->bi_size)
311 return 1; 312 return 1;
@@ -323,6 +324,7 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
323 * this branch is our 'one mirror IO has finished' event handler: 324 * this branch is our 'one mirror IO has finished' event handler:
324 */ 325 */
325 r1_bio->bios[mirror] = NULL; 326 r1_bio->bios[mirror] = NULL;
327 to_put = bio;
326 if (!uptodate) { 328 if (!uptodate) {
327 md_error(r1_bio->mddev, conf->mirrors[mirror].rdev); 329 md_error(r1_bio->mddev, conf->mirrors[mirror].rdev);
328 /* an I/O failed, we can't clear the bitmap */ 330 /* an I/O failed, we can't clear the bitmap */
@@ -375,7 +377,7 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
375 /* Don't dec_pending yet, we want to hold 377 /* Don't dec_pending yet, we want to hold
376 * the reference over the retry 378 * the reference over the retry
377 */ 379 */
378 return 0; 380 goto out;
379 } 381 }
380 if (test_bit(R1BIO_BehindIO, &r1_bio->state)) { 382 if (test_bit(R1BIO_BehindIO, &r1_bio->state)) {
381 /* free extra copy of the data pages */ 383 /* free extra copy of the data pages */
@@ -392,10 +394,11 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
392 raid_end_bio_io(r1_bio); 394 raid_end_bio_io(r1_bio);
393 } 395 }
394 396
395 if (r1_bio->bios[mirror]==NULL)
396 bio_put(bio);
397
398 rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev); 397 rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev);
398 out:
399 if (to_put)
400 bio_put(to_put);
401
399 return 0; 402 return 0;
400} 403}
401 404
@@ -857,7 +860,7 @@ static int make_request(request_queue_t *q, struct bio * bio)
857 atomic_set(&r1_bio->remaining, 0); 860 atomic_set(&r1_bio->remaining, 0);
858 atomic_set(&r1_bio->behind_remaining, 0); 861 atomic_set(&r1_bio->behind_remaining, 0);
859 862
860 do_barriers = bio->bi_rw & BIO_RW_BARRIER; 863 do_barriers = bio_barrier(bio);
861 if (do_barriers) 864 if (do_barriers)
862 set_bit(R1BIO_Barrier, &r1_bio->state); 865 set_bit(R1BIO_Barrier, &r1_bio->state);
863 866
diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h
index 1cef2387fa65..6aba41954448 100644
--- a/drivers/misc/ibmasm/ibmasm.h
+++ b/drivers/misc/ibmasm/ibmasm.h
@@ -101,15 +101,16 @@ struct command {
101static inline void command_put(struct command *cmd) 101static inline void command_put(struct command *cmd)
102{ 102{
103 unsigned long flags; 103 unsigned long flags;
104 spinlock_t *lock = cmd->lock;
104 105
105 spin_lock_irqsave(cmd->lock, flags); 106 spin_lock_irqsave(lock, flags);
106 kobject_put(&cmd->kobj); 107 kobject_put(&cmd->kobj);
107 spin_unlock_irqrestore(cmd->lock, flags); 108 spin_unlock_irqrestore(lock, flags);
108} 109}
109 110
110static inline void command_get(struct command *cmd) 111static inline void command_get(struct command *cmd)
111{ 112{
112 kobject_get(&cmd->kobj); 113 kobject_get(&cmd->kobj);
113} 114}
114 115
115 116
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 54ad93daca3c..bb96ce1db08c 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -411,7 +411,7 @@ static int pcmcia_device_probe(struct device * dev)
411 * pseudo devices, and if not, add the second one. 411 * pseudo devices, and if not, add the second one.
412 */ 412 */
413 did = (struct pcmcia_device_id *) p_dev->dev.driver_data; 413 did = (struct pcmcia_device_id *) p_dev->dev.driver_data;
414 if ((did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) && 414 if (did && (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&
415 (p_dev->socket->device_count == 1) && (p_dev->device_no == 0)) 415 (p_dev->socket->device_count == 1) && (p_dev->device_no == 0))
416 pcmcia_add_pseudo_device(p_dev->socket); 416 pcmcia_add_pseudo_device(p_dev->socket);
417 417
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c
index 4c1acc8daa82..1aa3c261718a 100644
--- a/drivers/s390/block/dasd_proc.c
+++ b/drivers/s390/block/dasd_proc.c
@@ -94,7 +94,7 @@ dasd_devices_show(struct seq_file *m, void *v)
94 seq_printf(m, "basic"); 94 seq_printf(m, "basic");
95 break; 95 break;
96 case DASD_STATE_UNFMT: 96 case DASD_STATE_UNFMT:
97 seq_printf(m, "unnformatted"); 97 seq_printf(m, "unformatted");
98 break; 98 break;
99 case DASD_STATE_READY: 99 case DASD_STATE_READY:
100 case DASD_STATE_ONLINE: 100 case DASD_STATE_ONLINE:
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c
index f3763d2ccb86..a37579ce6d76 100644
--- a/drivers/serial/ioc4_serial.c
+++ b/drivers/serial/ioc4_serial.c
@@ -2301,7 +2301,6 @@ static void receive_chars(struct uart_port *the_port)
2301 int read_count, request_count = IOC4_MAX_CHARS; 2301 int read_count, request_count = IOC4_MAX_CHARS;
2302 struct uart_icount *icount; 2302 struct uart_icount *icount;
2303 struct uart_info *info = the_port->info; 2303 struct uart_info *info = the_port->info;
2304 int flip = 0;
2305 unsigned long pflags; 2304 unsigned long pflags;
2306 2305
2307 /* Make sure all the pointers are "good" ones */ 2306 /* Make sure all the pointers are "good" ones */
@@ -2313,7 +2312,7 @@ static void receive_chars(struct uart_port *the_port)
2313 spin_lock_irqsave(&the_port->lock, pflags); 2312 spin_lock_irqsave(&the_port->lock, pflags);
2314 tty = info->tty; 2313 tty = info->tty;
2315 2314
2316 request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS - 2); 2315 request_count = tty_buffer_request_room(tty, IOC4_MAX_CHARS);
2317 2316
2318 if (request_count > 0) { 2317 if (request_count > 0) {
2319 icount = &the_port->icount; 2318 icount = &the_port->icount;
@@ -2326,8 +2325,7 @@ static void receive_chars(struct uart_port *the_port)
2326 2325
2327 spin_unlock_irqrestore(&the_port->lock, pflags); 2326 spin_unlock_irqrestore(&the_port->lock, pflags);
2328 2327
2329 if (flip) 2328 tty_flip_buffer_push(tty);
2330 tty_flip_buffer_push(tty);
2331} 2329}
2332 2330
2333/** 2331/**
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index df8e5667b348..466042808daf 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -253,7 +253,7 @@ static void arcfb_lcd_update_page(struct arcfb_par *par, unsigned int upper,
253{ 253{
254 unsigned char *src; 254 unsigned char *src;
255 unsigned int xindex, yindex, chipindex, linesize; 255 unsigned int xindex, yindex, chipindex, linesize;
256 int i, count; 256 int i;
257 unsigned char val; 257 unsigned char val;
258 unsigned char bitmask, rightshift; 258 unsigned char bitmask, rightshift;
259 259
@@ -282,7 +282,6 @@ static void arcfb_lcd_update_page(struct arcfb_par *par, unsigned int upper,
282 } 282 }
283 ks108_writeb_data(par, chipindex, val); 283 ks108_writeb_data(par, chipindex, val);
284 left++; 284 left++;
285 count++;
286 if (bitmask == 0x80) { 285 if (bitmask == 0x80) {
287 bitmask = 1; 286 bitmask = 1;
288 src++; 287 src++;
@@ -460,11 +459,11 @@ static ssize_t arcfb_write(struct file *file, const char __user *buf, size_t cou
460 inode = file->f_dentry->d_inode; 459 inode = file->f_dentry->d_inode;
461 fbidx = iminor(inode); 460 fbidx = iminor(inode);
462 info = registered_fb[fbidx]; 461 info = registered_fb[fbidx];
463 par = info->par;
464 462
465 if (!info || !info->screen_base) 463 if (!info || !info->screen_base)
466 return -ENODEV; 464 return -ENODEV;
467 465
466 par = info->par;
468 xres = info->var.xres; 467 xres = info->var.xres;
469 fbmemlength = (xres * info->var.yres)/8; 468 fbmemlength = (xres * info->var.yres)/8;
470 469
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index bfc8a93b2c73..620c9a934e0e 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -1326,7 +1326,7 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll,
1326 unsigned char post_dividers[] = {1,2,4,8,3,6,12}; 1326 unsigned char post_dividers[] = {1,2,4,8,3,6,12};
1327 u32 output_freq; 1327 u32 output_freq;
1328 u32 vclk; /* in .01 MHz */ 1328 u32 vclk; /* in .01 MHz */
1329 int i; 1329 int i = 0;
1330 u32 n, d; 1330 u32 n, d;
1331 1331
1332 vclk = 100000000 / period_in_ps; /* convert units to 10 kHz */ 1332 vclk = 100000000 / period_in_ps; /* convert units to 10 kHz */
@@ -1340,15 +1340,16 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll,
1340 /* now, find an acceptable divider */ 1340 /* now, find an acceptable divider */
1341 for (i = 0; i < sizeof(post_dividers); i++) { 1341 for (i = 0; i < sizeof(post_dividers); i++) {
1342 output_freq = post_dividers[i] * vclk; 1342 output_freq = post_dividers[i] * vclk;
1343 if (output_freq >= c.ppll_min && output_freq <= c.ppll_max) 1343 if (output_freq >= c.ppll_min && output_freq <= c.ppll_max) {
1344 pll->post_divider = post_dividers[i];
1344 break; 1345 break;
1346 }
1345 } 1347 }
1346 1348
1347 /* calculate feedback divider */ 1349 /* calculate feedback divider */
1348 n = c.ref_divider * output_freq; 1350 n = c.ref_divider * output_freq;
1349 d = c.ref_clk; 1351 d = c.ref_clk;
1350 1352
1351 pll->post_divider = post_dividers[i];
1352 pll->feedback_divider = round_div(n, d); 1353 pll->feedback_divider = round_div(n, d);
1353 pll->vclk = vclk; 1354 pll->vclk = vclk;
1354 1355
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c
index 7f9838dceab5..98c05bc0de44 100644
--- a/drivers/video/aty/radeon_monitor.c
+++ b/drivers/video/aty/radeon_monitor.c
@@ -396,6 +396,10 @@ static int __devinit radeon_parse_monitor_layout(struct radeonfb_info *rinfo,
396 s1[i] = *s; 396 s1[i] = *s;
397 i++; 397 i++;
398 } 398 }
399
400 if (i > 4)
401 i = 4;
402
399 } while (*s++); 403 } while (*s++);
400 if (second) 404 if (second)
401 s2[i] = 0; 405 s2[i] = 0;
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index bd39bbd88d41..151fda8dded0 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -172,7 +172,7 @@ struct backlight_device *backlight_device_register(const char *name, void *devda
172 172
173 new_bd = kmalloc(sizeof(struct backlight_device), GFP_KERNEL); 173 new_bd = kmalloc(sizeof(struct backlight_device), GFP_KERNEL);
174 if (unlikely(!new_bd)) 174 if (unlikely(!new_bd))
175 return ERR_PTR(ENOMEM); 175 return ERR_PTR(-ENOMEM);
176 176
177 init_MUTEX(&new_bd->sem); 177 init_MUTEX(&new_bd->sem);
178 new_bd->props = bp; 178 new_bd->props = bp;
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index 9e32485ee7bb..86908a60c630 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c
@@ -171,7 +171,7 @@ struct lcd_device *lcd_device_register(const char *name, void *devdata,
171 171
172 new_ld = kmalloc(sizeof(struct lcd_device), GFP_KERNEL); 172 new_ld = kmalloc(sizeof(struct lcd_device), GFP_KERNEL);
173 if (unlikely(!new_ld)) 173 if (unlikely(!new_ld))
174 return ERR_PTR(ENOMEM); 174 return ERR_PTR(-ENOMEM);
175 175
176 init_MUTEX(&new_ld->sem); 176 init_MUTEX(&new_ld->sem);
177 new_ld->props = lp; 177 new_ld->props = lp;
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
index ad416ae47596..7db42542eb19 100644
--- a/drivers/video/imsttfb.c
+++ b/drivers/video/imsttfb.c
@@ -1510,6 +1510,8 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1510 default: 1510 default:
1511 printk(KERN_INFO "imsttfb: Device 0x%x unknown, " 1511 printk(KERN_INFO "imsttfb: Device 0x%x unknown, "
1512 "contact maintainer.\n", pdev->device); 1512 "contact maintainer.\n", pdev->device);
1513 release_mem_region(addr, size);
1514 framebuffer_release(info);
1513 return -ENODEV; 1515 return -ENODEV;
1514 } 1516 }
1515 1517
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index 6b8bd3cdf9c0..995b47c165a7 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -1333,33 +1333,35 @@ intelfb_setcolreg(unsigned regno, unsigned red, unsigned green,
1333 if (regno > 255) 1333 if (regno > 255)
1334 return 1; 1334 return 1;
1335 1335
1336 switch (dinfo->depth) { 1336 if (dinfo->depth == 8) {
1337 case 8: 1337 red >>= 8;
1338 { 1338 green >>= 8;
1339 red >>= 8; 1339 blue >>= 8;
1340 green >>= 8; 1340
1341 blue >>= 8; 1341 intelfbhw_setcolreg(dinfo, regno, red, green, blue,
1342 transp);
1343 }
1342 1344
1343 intelfbhw_setcolreg(dinfo, regno, red, green, blue, 1345 if (regno < 16) {
1344 transp); 1346 switch (dinfo->depth) {
1347 case 15:
1348 dinfo->pseudo_palette[regno] = ((red & 0xf800) >> 1) |
1349 ((green & 0xf800) >> 6) |
1350 ((blue & 0xf800) >> 11);
1351 break;
1352 case 16:
1353 dinfo->pseudo_palette[regno] = (red & 0xf800) |
1354 ((green & 0xfc00) >> 5) |
1355 ((blue & 0xf800) >> 11);
1356 break;
1357 case 24:
1358 dinfo->pseudo_palette[regno] = ((red & 0xff00) << 8) |
1359 (green & 0xff00) |
1360 ((blue & 0xff00) >> 8);
1361 break;
1345 } 1362 }
1346 break;
1347 case 15:
1348 dinfo->pseudo_palette[regno] = ((red & 0xf800) >> 1) |
1349 ((green & 0xf800) >> 6) |
1350 ((blue & 0xf800) >> 11);
1351 break;
1352 case 16:
1353 dinfo->pseudo_palette[regno] = (red & 0xf800) |
1354 ((green & 0xfc00) >> 5) |
1355 ((blue & 0xf800) >> 11);
1356 break;
1357 case 24:
1358 dinfo->pseudo_palette[regno] = ((red & 0xff00) << 8) |
1359 (green & 0xff00) |
1360 ((blue & 0xff00) >> 8);
1361 break;
1362 } 1363 }
1364
1363 return 0; 1365 return 0;
1364} 1366}
1365 1367
diff --git a/drivers/video/kyro/STG4000VTG.c b/drivers/video/kyro/STG4000VTG.c
index 3690b04190af..bd389709d234 100644
--- a/drivers/video/kyro/STG4000VTG.c
+++ b/drivers/video/kyro/STG4000VTG.c
@@ -17,7 +17,7 @@
17void DisableVGA(volatile STG4000REG __iomem *pSTGReg) 17void DisableVGA(volatile STG4000REG __iomem *pSTGReg)
18{ 18{
19 u32 tmp; 19 u32 tmp;
20 volatile u32 count, i; 20 volatile u32 count = 0, i;
21 21
22 /* Reset the VGA registers */ 22 /* Reset the VGA registers */
23 tmp = STG_READ_REG(SoftwareReset); 23 tmp = STG_READ_REG(SoftwareReset);
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index a2e201dc40f7..b961d5601bd9 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -486,10 +486,8 @@ static void vgaHWRestore(const struct fb_info *info,
486static inline int neo2200_sync(struct fb_info *info) 486static inline int neo2200_sync(struct fb_info *info)
487{ 487{
488 struct neofb_par *par = info->par; 488 struct neofb_par *par = info->par;
489 int waitcycles;
490 489
491 while (readl(&par->neo2200->bltStat) & 1) 490 while (readl(&par->neo2200->bltStat) & 1);
492 waitcycles++;
493 return 0; 491 return 0;
494} 492}
495 493
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c
index e5d0f92eeae3..feec47bdd479 100644
--- a/drivers/video/s1d13xxxfb.c
+++ b/drivers/video/s1d13xxxfb.c
@@ -588,6 +588,7 @@ s1d13xxxfb_probe(struct platform_device *pdev)
588 goto bail; 588 goto bail;
589 } 589 }
590 590
591 platform_set_drvdata(pdev, info);
591 default_par = info->par; 592 default_par = info->par;
592 default_par->regs = ioremap_nocache(pdev->resource[1].start, 593 default_par->regs = ioremap_nocache(pdev->resource[1].start,
593 pdev->resource[1].end - pdev->resource[1].start +1); 594 pdev->resource[1].end - pdev->resource[1].start +1);
@@ -638,8 +639,6 @@ s1d13xxxfb_probe(struct platform_device *pdev)
638 goto bail; 639 goto bail;
639 } 640 }
640 641
641 platform_set_drvdata(pdev, info);
642
643 printk(KERN_INFO "fb%d: %s frame buffer device\n", 642 printk(KERN_INFO "fb%d: %s frame buffer device\n",
644 info->node, info->fix.id); 643 info->node, info->fix.id);
645 644
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
index ab727eaa7f43..10e6b3aab9ea 100644
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -2021,8 +2021,8 @@ static int __devinit savagefb_probe (struct pci_dev* dev,
2021#if defined(CONFIG_FB_SAVAGE_I2C) 2021#if defined(CONFIG_FB_SAVAGE_I2C)
2022 savagefb_create_i2c_busses(info); 2022 savagefb_create_i2c_busses(info);
2023 savagefb_probe_i2c_connector(info, &par->edid); 2023 savagefb_probe_i2c_connector(info, &par->edid);
2024 kfree(par->edid);
2025 fb_edid_to_monspecs(par->edid, &info->monspecs); 2024 fb_edid_to_monspecs(par->edid, &info->monspecs);
2025 kfree(par->edid);
2026 fb_videomode_to_modelist(info->monspecs.modedb, 2026 fb_videomode_to_modelist(info->monspecs.modedb,
2027 info->monspecs.modedb_len, 2027 info->monspecs.modedb_len,
2028 &info->modelist); 2028 &info->modelist);
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c
index 3e7baf4c9fa8..5e5328d682db 100644
--- a/drivers/video/tdfxfb.c
+++ b/drivers/video/tdfxfb.c
@@ -786,28 +786,32 @@ static int tdfxfb_setcolreg(unsigned regno, unsigned red, unsigned green,
786 if (regno >= info->cmap.len || regno > 255) return 1; 786 if (regno >= info->cmap.len || regno > 255) return 1;
787 787
788 switch (info->fix.visual) { 788 switch (info->fix.visual) {
789 case FB_VISUAL_PSEUDOCOLOR: 789 case FB_VISUAL_PSEUDOCOLOR:
790 rgbcol =(((u32)red & 0xff00) << 8) | 790 rgbcol =(((u32)red & 0xff00) << 8) |
791 (((u32)green & 0xff00) << 0) | 791 (((u32)green & 0xff00) << 0) |
792 (((u32)blue & 0xff00) >> 8); 792 (((u32)blue & 0xff00) >> 8);
793 do_setpalentry(par, regno, rgbcol); 793 do_setpalentry(par, regno, rgbcol);
794 break; 794 break;
795 /* Truecolor has no hardware color palettes. */ 795 /* Truecolor has no hardware color palettes. */
796 case FB_VISUAL_TRUECOLOR: 796 case FB_VISUAL_TRUECOLOR:
797 if (regno < 16) {
797 rgbcol = (CNVT_TOHW( red, info->var.red.length) << 798 rgbcol = (CNVT_TOHW( red, info->var.red.length) <<
798 info->var.red.offset) | 799 info->var.red.offset) |
799 (CNVT_TOHW( green, info->var.green.length) << 800 (CNVT_TOHW( green, info->var.green.length) <<
800 info->var.green.offset) | 801 info->var.green.offset) |
801 (CNVT_TOHW( blue, info->var.blue.length) << 802 (CNVT_TOHW( blue, info->var.blue.length) <<
802 info->var.blue.offset) | 803 info->var.blue.offset) |
803 (CNVT_TOHW( transp, info->var.transp.length) << 804 (CNVT_TOHW( transp, info->var.transp.length) <<
804 info->var.transp.offset); 805 info->var.transp.offset);
805 par->palette[regno] = rgbcol; 806 par->palette[regno] = rgbcol;
806 break; 807 }
807 default: 808
808 DPRINTK("bad depth %u\n", info->var.bits_per_pixel); 809 break;
809 break; 810 default:
811 DPRINTK("bad depth %u\n", info->var.bits_per_pixel);
812 break;
810 } 813 }
814
811 return 0; 815 return 0;
812} 816}
813 817