]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'video' into release
authorLen Brown <len.brown@intel.com>
Sun, 5 Apr 2009 05:40:06 +0000 (01:40 -0400)
committerLen Brown <len.brown@intel.com>
Sun, 5 Apr 2009 05:40:06 +0000 (01:40 -0400)
Conflicts:
drivers/acpi/video.c

Signed-off-by: Len Brown <len.brown@intel.com>
1  2 
drivers/acpi/video.c

index 5259d502add6a76405cd1c2401b222c6157b8761,ae427100a1efd4544f0d3ee881ffcb1547f0e2bc..100c8eeaa5dd9eea15f92dd142a5167f4fe1c1be
@@@ -374,14 -385,14 +388,15 @@@ static int video_get_cur_state(struct t
        struct acpi_device *device = cdev->devdata;
        struct acpi_video_device *video = acpi_driver_data(device);
        unsigned long long level;
 -      int state;
 +      int offset;
  
-       acpi_video_device_lcd_get_level_current(video, &level);
+       if (acpi_video_device_lcd_get_level_current(video, &level))
+               return -EINVAL;
 -      for (state = 2; state < video->brightness->count; state++)
 -              if (level == video->brightness->levels[state])
 -                      return sprintf(buf, "%d\n",
 -                                     video->brightness->count - state - 1);
 +      for (offset = 2; offset < video->brightness->count; offset++)
 +              if (level == video->brightness->levels[offset]) {
 +                      *state = video->brightness->count - offset - 1;
 +                      return 0;
 +              }
  
        return -EINVAL;
  }