Commit 15f10bd1 authored by Sara Bird's avatar Sara Bird Committed by Greg Kroah-Hartman

staging/frontier: Fixed up incorrect formatted comments

The existing comments are using an odd style. Fixed them up to adhereto the
StyleGuide. No code changes.
Signed-off-by: default avatarSara Bird <sara.bird.iar@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 396b7fd6
...@@ -24,13 +24,14 @@ ...@@ -24,13 +24,14 @@
* raw interrupt reports. * raw interrupt reports.
*/ */
/* Note: this currently uses a dumb ringbuffer for reads and writes. /*
* Note: this currently uses a dumb ringbuffer for reads and writes.
* A more optimal driver would cache and kill off outstanding urbs that are * A more optimal driver would cache and kill off outstanding urbs that are
* now invalid, and ignore ones that already were in the queue but valid * now invalid, and ignore ones that already were in the queue but valid
* as we only have 30 commands for the alphatrack. In particular this is * as we only have 30 commands for the alphatrack. In particular this is
* key for getting lights to flash in time as otherwise many commands * key for getting lights to flash in time as otherwise many commands
* can be buffered up before the light change makes it to the interface. * can be buffered up before the light change makes it to the interface.
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -100,7 +101,8 @@ static int debug = ALPHATRACK_DEBUG; ...@@ -100,7 +101,8 @@ static int debug = ALPHATRACK_DEBUG;
module_param(debug, int, S_IRUGO | S_IWUSR); module_param(debug, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug enabled or not"); MODULE_PARM_DESC(debug, "Debug enabled or not");
/* All interrupt in transfers are collected in a ring buffer to /*
* All interrupt in transfers are collected in a ring buffer to
* avoid racing conditions and get better performance of the driver. * avoid racing conditions and get better performance of the driver.
*/ */
...@@ -109,8 +111,7 @@ static int ring_buffer_size = RING_BUFFER_SIZE; ...@@ -109,8 +111,7 @@ static int ring_buffer_size = RING_BUFFER_SIZE;
module_param(ring_buffer_size, int, S_IRUGO); module_param(ring_buffer_size, int, S_IRUGO);
MODULE_PARM_DESC(ring_buffer_size, "Read ring buffer size"); MODULE_PARM_DESC(ring_buffer_size, "Read ring buffer size");
/* The write_buffer can one day contain more than one interrupt out transfer. /* The write_buffer can one day contain more than one interrupt out transfer.*/
*/
static int write_buffer_size = WRITE_BUFFER_SIZE; static int write_buffer_size = WRITE_BUFFER_SIZE;
module_param(write_buffer_size, int, S_IRUGO); module_param(write_buffer_size, int, S_IRUGO);
...@@ -199,9 +200,7 @@ static void usb_alphatrack_abort_transfers(struct usb_alphatrack *dev) ...@@ -199,9 +200,7 @@ static void usb_alphatrack_abort_transfers(struct usb_alphatrack *dev)
usb_kill_urb(dev->interrupt_out_urb); usb_kill_urb(dev->interrupt_out_urb);
} }
/** /** usb_alphatrack_delete */
* usb_alphatrack_delete
*/
static void usb_alphatrack_delete(struct usb_alphatrack *dev) static void usb_alphatrack_delete(struct usb_alphatrack *dev)
{ {
usb_alphatrack_abort_transfers(dev); usb_alphatrack_abort_transfers(dev);
...@@ -213,9 +212,7 @@ static void usb_alphatrack_delete(struct usb_alphatrack *dev) ...@@ -213,9 +212,7 @@ static void usb_alphatrack_delete(struct usb_alphatrack *dev)
kfree(dev); /* fixme oldi_buffer */ kfree(dev); /* fixme oldi_buffer */
} }
/** /** usb_alphatrack_interrupt_in_callback */
* usb_alphatrack_interrupt_in_callback
*/
static void usb_alphatrack_interrupt_in_callback(struct urb *urb) static void usb_alphatrack_interrupt_in_callback(struct urb *urb)
{ {
...@@ -296,9 +293,7 @@ static void usb_alphatrack_interrupt_in_callback(struct urb *urb) ...@@ -296,9 +293,7 @@ static void usb_alphatrack_interrupt_in_callback(struct urb *urb)
wake_up_interruptible(&dev->read_wait); wake_up_interruptible(&dev->read_wait);
} }
/** /** usb_alphatrack_interrupt_out_callback */
* usb_alphatrack_interrupt_out_callback
*/
static void usb_alphatrack_interrupt_out_callback(struct urb *urb) static void usb_alphatrack_interrupt_out_callback(struct urb *urb)
{ {
struct usb_alphatrack *dev = urb->context; struct usb_alphatrack *dev = urb->context;
...@@ -315,9 +310,7 @@ static void usb_alphatrack_interrupt_out_callback(struct urb *urb) ...@@ -315,9 +310,7 @@ static void usb_alphatrack_interrupt_out_callback(struct urb *urb)
wake_up_interruptible(&dev->write_wait); wake_up_interruptible(&dev->write_wait);
} }
/** /** usb_alphatrack_open */
* usb_alphatrack_open
*/
static int usb_alphatrack_open(struct inode *inode, struct file *file) static int usb_alphatrack_open(struct inode *inode, struct file *file)
{ {
struct usb_alphatrack *dev; struct usb_alphatrack *dev;
...@@ -398,9 +391,7 @@ static int usb_alphatrack_open(struct inode *inode, struct file *file) ...@@ -398,9 +391,7 @@ static int usb_alphatrack_open(struct inode *inode, struct file *file)
return retval; return retval;
} }
/** /** usb_alphatrack_release */
* usb_alphatrack_release
*/
static int usb_alphatrack_release(struct inode *inode, struct file *file) static int usb_alphatrack_release(struct inode *inode, struct file *file)
{ {
struct usb_alphatrack *dev; struct usb_alphatrack *dev;
...@@ -447,9 +438,7 @@ static int usb_alphatrack_release(struct inode *inode, struct file *file) ...@@ -447,9 +438,7 @@ static int usb_alphatrack_release(struct inode *inode, struct file *file)
return retval; return retval;
} }
/** /** usb_alphatrack_poll */
* usb_alphatrack_poll
*/
static unsigned int usb_alphatrack_poll(struct file *file, poll_table *wait) static unsigned int usb_alphatrack_poll(struct file *file, poll_table *wait)
{ {
struct usb_alphatrack *dev; struct usb_alphatrack *dev;
...@@ -468,9 +457,7 @@ static unsigned int usb_alphatrack_poll(struct file *file, poll_table *wait) ...@@ -468,9 +457,7 @@ static unsigned int usb_alphatrack_poll(struct file *file, poll_table *wait)
return mask; return mask;
} }
/** /** usb_alphatrack_read */
* usb_alphatrack_read
*/
static ssize_t usb_alphatrack_read(struct file *file, char __user *buffer, static ssize_t usb_alphatrack_read(struct file *file, char __user *buffer,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
...@@ -539,9 +526,7 @@ static ssize_t usb_alphatrack_read(struct file *file, char __user *buffer, ...@@ -539,9 +526,7 @@ static ssize_t usb_alphatrack_read(struct file *file, char __user *buffer,
return retval; return retval;
} }
/** /** usb_alphatrack_write */
* usb_alphatrack_write
*/
static ssize_t usb_alphatrack_write(struct file *file, static ssize_t usb_alphatrack_write(struct file *file,
const char __user *buffer, size_t count, const char __user *buffer, size_t count,
loff_t *ppos) loff_t *ppos)
...@@ -718,8 +703,10 @@ static int usb_alphatrack_probe(struct usb_interface *intf, ...@@ -718,8 +703,10 @@ static int usb_alphatrack_probe(struct usb_interface *intf,
true_size = min(ring_buffer_size, RING_BUFFER_SIZE); true_size = min(ring_buffer_size, RING_BUFFER_SIZE);
/* FIXME - there are more usb_alloc routines for dma correctness. /*
Needed? */ * FIXME - there are more usb_alloc routines for dma correctness.
* Needed?
*/
dev->ring_buffer = kmalloc_array(true_size, dev->ring_buffer = kmalloc_array(true_size,
sizeof(struct alphatrack_icmd), sizeof(struct alphatrack_icmd),
GFP_KERNEL); GFP_KERNEL);
......
...@@ -6,7 +6,8 @@ struct alphatrack_ocmd { ...@@ -6,7 +6,8 @@ struct alphatrack_ocmd {
unsigned char cmd[8]; unsigned char cmd[8];
}; };
/* These are unused by the present driver but provide documentation for the /*
* These are unused by the present driver but provide documentation for the
* userspace API. * userspace API.
*/ */
enum LightID { enum LightID {
...@@ -58,7 +59,8 @@ enum LightID { ...@@ -58,7 +59,8 @@ enum LightID {
#define BUTTONMASK_PRESS2 0x00008010 #define BUTTONMASK_PRESS2 0x00008010
#define BUTTONMASK_PRESS3 0x00002020 #define BUTTONMASK_PRESS3 0x00002020
/* last 3 bytes are the slider position /*
* last 3 bytes are the slider position
* 40 is the actual slider moving, the most sig bits, and 3 lsb * 40 is the actual slider moving, the most sig bits, and 3 lsb
*/ */
......
...@@ -86,7 +86,8 @@ static int debug = TRANZPORT_DEBUG; ...@@ -86,7 +86,8 @@ static int debug = TRANZPORT_DEBUG;
module_param(debug, int, S_IRUGO | S_IWUSR); module_param(debug, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug enabled or not"); MODULE_PARM_DESC(debug, "Debug enabled or not");
/* All interrupt in transfers are collected in a ring buffer to /*
* All interrupt in transfers are collected in a ring buffer to
* avoid racing conditions and get better performance of the driver. * avoid racing conditions and get better performance of the driver.
*/ */
...@@ -95,7 +96,8 @@ static int ring_buffer_size = RING_BUFFER_SIZE; ...@@ -95,7 +96,8 @@ static int ring_buffer_size = RING_BUFFER_SIZE;
module_param(ring_buffer_size, int, S_IRUGO); module_param(ring_buffer_size, int, S_IRUGO);
MODULE_PARM_DESC(ring_buffer_size, "Read ring buffer size in reports"); MODULE_PARM_DESC(ring_buffer_size, "Read ring buffer size in reports");
/* The write_buffer can one day contain more than one interrupt out transfer. /*
* The write_buffer can one day contain more than one interrupt out transfer.
*/ */
static int write_buffer_size = WRITE_BUFFER_SIZE; static int write_buffer_size = WRITE_BUFFER_SIZE;
module_param(write_buffer_size, int, S_IRUGO); module_param(write_buffer_size, int, S_IRUGO);
...@@ -565,9 +567,9 @@ static ssize_t usb_tranzport_read(struct file *file, char __user *buffer, ...@@ -565,9 +567,9 @@ static ssize_t usb_tranzport_read(struct file *file, char __user *buffer,
newwheel = (*dev->ring_buffer)[next_tail].cmd[6]; newwheel = (*dev->ring_buffer)[next_tail].cmd[6];
oldwheel = (*dev->ring_buffer)[dev->ring_tail].cmd[6]; oldwheel = (*dev->ring_buffer)[dev->ring_tail].cmd[6];
/* if both are wheel events, and /* if both are wheel events, and
no buttons have changes (FIXME, do I have to check?), * no buttons have changes (FIXME, do I have to check?),
and we are the same sign, we can compress +- 7F * and we are the same sign, we can compress +- 7F
*/ */
dbg_info(&dev->intf->dev, dbg_info(&dev->intf->dev,
"%s: trying to compress: " "%s: trying to compress: "
"%02x%02x%02x%02x%02x%02x%02x%02x\n", "%02x%02x%02x%02x%02x%02x%02x%02x\n",
...@@ -842,8 +844,10 @@ static int usb_tranzport_probe(struct usb_interface *intf, ...@@ -842,8 +844,10 @@ static int usb_tranzport_probe(struct usb_interface *intf,
ring_buffer_size = RING_BUFFER_SIZE; ring_buffer_size = RING_BUFFER_SIZE;
true_size = min(ring_buffer_size, RING_BUFFER_SIZE); true_size = min(ring_buffer_size, RING_BUFFER_SIZE);
/* FIXME - there are more usb_alloc routines for dma correctness. /*
Needed? */ * FIXME - there are more usb_alloc routines for dma correctness.
* Needed?
*/
dev->ring_buffer = dev->ring_buffer =
kmalloc((true_size * sizeof(struct tranzport_cmd)) + 8, GFP_KERNEL); kmalloc((true_size * sizeof(struct tranzport_cmd)) + 8, GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment