Commit 69f93abf authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

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: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent be5064c7
......@@ -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"
......
......@@ -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 @@ static void cport_out_callback(struct urb *urb)
* 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)
......
......@@ -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 {
......
......@@ -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;
......
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