1. 04 Oct, 2015 1 commit
  2. 01 Apr, 2015 1 commit
    • Keith Packard's avatar
      usb: Fix warnings in chaoskey driver · 8b86ed07
      Keith Packard authored
      >    drivers/usb/misc/chaoskey.c: In function 'chaoskey_read':
      > >> drivers/usb/misc/chaoskey.c:412:3: error: implicit declaration of function 'copy_to_user'
      > >> [-Werror=implicit-function-declaration]
      >       remain = copy_to_user(buffer, dev->buf + dev->used, this_time);
      I was unable to reproduce this locally, but added an explicit
      	#include <linux/uaccess.h>
      which should ensure the definition on all architectures.
      > sparse warnings: (new ones prefixed by >>)
      > >> drivers/usb/misc/chaoskey.c:117:30: sparse: incorrect type in assignment (different base types)
      >    drivers/usb/misc/chaoskey.c:117:30:    expected int [signed] size
      >    drivers/usb/misc/chaoskey.c:117:30:    got restricted __le16 [usertype] wMaxPacketSize
      Switched the code to using the USB descriptor accessor functions.
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  3. 26 Mar, 2015 1 commit
    • Keith Packard's avatar
      usb: Add driver for Altus Metrum ChaosKey device (v2) · 66e3e591
      Keith Packard authored
      This is a hardware random number generator. The driver provides both a
      /dev/chaoskeyX entry and hooks the entropy source up to the kernel
      hwrng interface. More information about the device can be found at
      The USB ID for ChaosKey was allocated from the OpenMoko USB vendor
      space and is visible as 'USBtrng' here:
      v2: Respond to review from Oliver Neukum <oneukum@suse.de>
       * Delete extensive debug infrastructure and replace it with calls to
       * Allocate I/O buffer separately from device structure to obey
         requirements for non-coherant architectures.
       * Initialize mutexes before registering device to ensure that open
         cannot be invoked before the device is ready to proceed.
       * Return number of bytes read instead of -EINTR when partial read
         operation is aborted due to a signal.
       * Make sure device mutex is unlocked in read error paths.
       * Add MAINTAINERS entry for the driver
      Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
      Cc: Oliver Neukum <oneukum@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>