hwmon: (f71882fg) Cleanup sysfs attr creation 1/2
[safe/jmp/linux-2.6] / drivers / video / atafb.c
index 8cd279b..b7687c5 100644 (file)
@@ -329,12 +329,6 @@ extern unsigned char fontdata_8x16[];
  *
  *     * perform fb specific mmap *
  *     int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma);
- *
- *     * save current hardware state *
- *     void (*fb_save_state)(struct fb_info *info);
- *
- *     * restore saved state *
- *     void (*fb_restore_state)(struct fb_info *info);
  * } ;
  */
 
@@ -2248,6 +2242,9 @@ static int ext_setcolreg(unsigned int regno, unsigned int red,
        if (!external_vgaiobase)
                return 1;
 
+       if (regno > 255)
+               return 1;
+
        switch (external_card_type) {
        case IS_VGA:
                OUTB(0x3c8, regno);