greybus: simple fixes

A few silly little fixes.
    - Clear out some unnecessary #includes in "debugfs.c"
    - Drop some unneeded parentheses in hd_to_es1()
    - Use &hd->hd_priv in hd_to_es1() to emphasize we are working
      with an embedded array, not a pointer
    - Fix a comment in the header for ap_probe()
    - Drop a duplicate #include in "gpio-gb.c"
    - Fix a use-before-set problem in set_serial_info()

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This commit is contained in:
Alex Elder 2014-09-22 18:53:02 -05:00 committed by Greg Kroah-Hartman
parent be5064c75b
commit 69f93abf11
4 changed files with 3 additions and 9 deletions

View File

@ -8,11 +8,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/types.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/debugfs.h>
#include "greybus.h"

View File

@ -77,7 +77,7 @@ struct es1_ap_dev {
static inline struct es1_ap_dev *hd_to_es1(struct greybus_host_device *hd)
{
return (struct es1_ap_dev *)(hd->hd_priv);
return (struct es1_ap_dev *)&hd->hd_priv;
}
static void cport_out_callback(struct urb *urb);
@ -370,7 +370,7 @@ exit:
* 1 Control - usual USB stuff + AP -> SVC messages
* 1 Interrupt IN - SVC -> AP messages
* 1 Bulk IN - CPort data in
* 1 Bulk OUT - CPorta data out
* 1 Bulk OUT - CPort data out
*/
static int ap_probe(struct usb_interface *interface,
const struct usb_device_id *id)

View File

@ -10,7 +10,6 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/gpio.h>
#include <linux/gpio.h>
#include "greybus.h"
struct gb_gpio_device {

View File

@ -257,7 +257,7 @@ static int set_serial_info(struct gb_tty *gb_tty,
struct serial_struct new_serial;
unsigned int closing_wait;
unsigned int close_delay;
int retval;
int retval = 0;
if (copy_from_user(&new_serial, newinfo, sizeof(new_serial)))
return -EFAULT;