Merge branch 'master' into upstream.
authorJiri Kosina <jkosina@suse.cz>
Wed, 18 May 2011 15:06:31 +0000 (17:06 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 18 May 2011 15:06:49 +0000 (17:06 +0200)
This is sync with Linus' tree to receive KEY_IMAGES definition
that went in through input tree.

1  2 
Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
drivers/hid/hid-picolcd.c

@@@ -1,12 -1,9 +1,12 @@@
  What:         /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/actual_profile
  Date:         October 2010
  Contact:      Stefan Achatz <erazor_de@users.sourceforge.net>
 -Description:  When read, this file returns the number of the actual profile in
 -              range 0-4.
 -              This file is readonly.
 +Description:  The integer value of this attribute ranges from 0-4.
 +                When read, this attribute returns the number of the actual
 +                profile. This value is persistent, so its equivalent to the
 +                profile that's active when the mouse is powered on next time.
 +              When written, this file sets the number of the startup profile
 +              and the mouse activates this profile immediately.
  Users:                http://roccat.sourceforge.net
  
  What:         /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/firmware_version
@@@ -36,7 -33,7 +36,7 @@@ Date:         August 201
  Contact:      Stefan Achatz <erazor_de@users.sourceforge.net>
  Description:  The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When written, this file lets one write the respective profile
                buttons back to the mouse. The data has to be 77 bytes long.
                The mouse will reject invalid data.
@@@ -50,7 -47,7 +50,7 @@@ Date:         August 201
  Contact:      Stefan Achatz <erazor_de@users.sourceforge.net>
  Description:  The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When read, these files return the respective profile buttons.
                The returned data is 77 bytes in size.
                This file is readonly.
@@@ -61,7 -58,7 +61,7 @@@ Date:         October 201
  Contact:      Stefan Achatz <erazor_de@users.sourceforge.net>
  Description:  The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When written, this file lets one write the respective profile
                settings back to the mouse. The data has to be 43 bytes long.
@@@ -76,7 -73,7 +76,7 @@@ Date:         August 201
  Contact:      Stefan Achatz <erazor_de@users.sourceforge.net>
  Description:  The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When read, these files return the respective profile settings.
                The returned data is 43 bytes in size.
@@@ -92,6 -89,16 +92,6 @@@ Description: The mouse has a tracking- 
                This file is writeonly.
  Users:                http://roccat.sourceforge.net
  
 -What:         /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/startup_profile
 -Date:         October 2010
 -Contact:      Stefan Achatz <erazor_de@users.sourceforge.net>
 -Description:  The integer value of this attribute ranges from 0-4.
 -                When read, this attribute returns the number of the profile
 -                that's active when the mouse is powered on.
 -              When written, this file sets the number of the startup profile
 -              and the mouse activates this profile immediately.
 -Users:                http://roccat.sourceforge.net
 -
  What:         /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/koneplus/roccatkoneplus<minor>/tcu
  Date:         October 2010
  Contact:      Stefan Achatz <erazor_de@users.sourceforge.net>
@@@ -944,6 -944,7 +944,7 @@@ static int picolcd_init_backlight(struc
        }
  
        memset(&props, 0, sizeof(props));
+       props.type = BACKLIGHT_RAW;
        props.max_brightness = 0xff;
        bdev = backlight_device_register(dev_name(dev), dev, data,
                        &picolcd_blops, &props);
@@@ -1584,11 -1585,11 +1585,11 @@@ static ssize_t picolcd_debug_eeprom_wri
        memset(raw_data, 0, sizeof(raw_data));
        raw_data[0] = *off & 0xff;
        raw_data[1] = (*off >> 8) & 0xff;
 -      raw_data[2] = s < 20 ? s : 20;
 +      raw_data[2] = min((size_t)20, s);
        if (*off + raw_data[2] > 0xff)
                raw_data[2] = 0x100 - *off;
  
 -      if (copy_from_user(raw_data+3, u, raw_data[2]))
 +      if (copy_from_user(raw_data+3, u, min((u8)20, raw_data[2])))
                return -EFAULT;
        resp = picolcd_send_and_wait(data->hdev, REPORT_EE_WRITE, raw_data,
                        sizeof(raw_data));
@@@ -1805,13 -1806,13 +1806,13 @@@ static ssize_t picolcd_debug_flash_writ
  /*
   * Notes:
   * - concurrent writing is prevented by mutex and all writes must be
-  *   n*64 bytes and 64-byte aligned, each write being preceeded by an
+  *   n*64 bytes and 64-byte aligned, each write being preceded by an
   *   ERASE which erases a 64byte block.
   *   If less than requested was written or an error is returned for an
   *   otherwise correct write request the next 64-byte block which should
   *   have been written is in undefined state (mostly: original, erased,
   *   (half-)written with write error)
-  * - reading can happend without special restriction
+  * - reading can happen without special restriction
   */
  static const struct file_operations picolcd_debug_flash_fops = {
        .owner    = THIS_MODULE,