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

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
Loading
Loading
Loading
Loading
+18 −31
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@
 * 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
 * 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
@@ -100,7 +101,8 @@ static int debug = ALPHATRACK_DEBUG;
module_param(debug, int, S_IRUGO | S_IWUSR);
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.
 */

@@ -109,8 +111,7 @@ static int ring_buffer_size = RING_BUFFER_SIZE;
module_param(ring_buffer_size, int, S_IRUGO);
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;
module_param(write_buffer_size, int, S_IRUGO);
@@ -199,9 +200,7 @@ static void usb_alphatrack_abort_transfers(struct usb_alphatrack *dev)
			usb_kill_urb(dev->interrupt_out_urb);
}

/**
 *	usb_alphatrack_delete
 */
/** usb_alphatrack_delete */
static void usb_alphatrack_delete(struct usb_alphatrack *dev)
{
	usb_alphatrack_abort_transfers(dev);
@@ -213,9 +212,7 @@ static void usb_alphatrack_delete(struct usb_alphatrack *dev)
	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)
{
@@ -296,9 +293,7 @@ exit:
	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)
{
	struct usb_alphatrack *dev = urb->context;
@@ -315,9 +310,7 @@ static void usb_alphatrack_interrupt_out_callback(struct urb *urb)
	wake_up_interruptible(&dev->write_wait);
}

/**
 *	usb_alphatrack_open
 */
/** usb_alphatrack_open */
static int usb_alphatrack_open(struct inode *inode, struct file *file)
{
	struct usb_alphatrack *dev;
@@ -398,9 +391,7 @@ unlock_disconnect_exit:
	return retval;
}

/**
 *	usb_alphatrack_release
 */
/** usb_alphatrack_release */
static int usb_alphatrack_release(struct inode *inode, struct file *file)
{
	struct usb_alphatrack *dev;
@@ -447,9 +438,7 @@ exit:
	return retval;
}

/**
 *	usb_alphatrack_poll
 */
/** usb_alphatrack_poll */
static unsigned int usb_alphatrack_poll(struct file *file, poll_table *wait)
{
	struct usb_alphatrack *dev;
@@ -468,9 +457,7 @@ static unsigned int usb_alphatrack_poll(struct file *file, poll_table *wait)
	return mask;
}

/**
 *	usb_alphatrack_read
 */
/** usb_alphatrack_read */
static ssize_t usb_alphatrack_read(struct file *file, char __user *buffer,
				   size_t count, loff_t *ppos)
{
@@ -539,9 +526,7 @@ exit:
	return retval;
}

/**
 *	usb_alphatrack_write
 */
/** usb_alphatrack_write */
static ssize_t usb_alphatrack_write(struct file *file,
				    const char __user *buffer, size_t count,
				    loff_t *ppos)
@@ -718,8 +703,10 @@ static int usb_alphatrack_probe(struct usb_interface *intf,

	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,
					 sizeof(struct alphatrack_icmd),
					 GFP_KERNEL);
+4 −2
Original line number Diff line number Diff line
@@ -6,7 +6,8 @@ struct alphatrack_ocmd {
	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.
 */
enum LightID {
@@ -58,7 +59,8 @@ enum LightID {
#define BUTTONMASK_PRESS2      0x00008010
#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
 */

+11 −7
Original line number Diff line number Diff line
@@ -86,7 +86,8 @@ static int debug = TRANZPORT_DEBUG;
module_param(debug, int, S_IRUGO | S_IWUSR);
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.
 */

@@ -95,7 +96,8 @@ static int ring_buffer_size = RING_BUFFER_SIZE;
module_param(ring_buffer_size, int, S_IRUGO);
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;
module_param(write_buffer_size, int, S_IRUGO);
@@ -565,8 +567,8 @@ static ssize_t usb_tranzport_read(struct file *file, char __user *buffer,
			newwheel = (*dev->ring_buffer)[next_tail].cmd[6];
			oldwheel = (*dev->ring_buffer)[dev->ring_tail].cmd[6];
			/* if both are wheel events, and
			   no buttons have changes (FIXME, do I have to check?),
			   and we are the same sign, we can compress +- 7F
			 * no buttons have changes (FIXME, do I have to check?),
			 * and we are the same sign, we can compress +- 7F
			 */
			dbg_info(&dev->intf->dev,
				"%s: trying to compress: "
@@ -842,8 +844,10 @@ static int usb_tranzport_probe(struct usb_interface *intf,
		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((true_size * sizeof(struct tranzport_cmd)) + 8, GFP_KERNEL);