greybus: minor checkpatch cleanups
authorGreg Kroah-Hartman <greg@kroah.com>
Tue, 2 Sep 2014 02:10:06 +0000 (19:10 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 2 Sep 2014 02:10:06 +0000 (19:10 -0700)
drivers/staging/greybus/core.c
drivers/staging/greybus/gpio-gb.c
drivers/staging/greybus/sysfs.c
drivers/staging/greybus/uart-gb.c

index bbe9ef9..da62baf 100644 (file)
@@ -226,8 +226,9 @@ error_i2c:
        return retval;
 }
 
-static const struct greybus_module_id fake_gb_id =
-       { GREYBUS_DEVICE(0x42, 0x42) };
+static const struct greybus_module_id fake_gb_id = {
+       GREYBUS_DEVICE(0x42, 0x42)
+};
 
 static int create_function(struct greybus_device *gdev,
                           struct greybus_descriptor *desc, int desc_size)
index c4cb6a2..3428220 100644 (file)
@@ -48,7 +48,6 @@ static int gpio_get(struct gpio_chip *gpio, unsigned nr)
 static void gpio_set(struct gpio_chip *gpio, unsigned nr, int val)
 {
        // FIXME - do something there
-       return;
 }
 
 int gb_gpio_probe(struct greybus_device *gdev,
@@ -77,7 +76,7 @@ int gb_gpio_probe(struct greybus_device *gdev,
        gpio->ngpio = 42;               // FIXME!!!
        gpio->can_sleep = false;        // FIXME!!!
 
-       gdev->gb_gpio_dev= gb_gpio;
+       gdev->gb_gpio_dev = gb_gpio;
 
        retval = gpiochip_add(gpio);
        if (retval) {
index 16e6ca4..2393a6a 100644 (file)
@@ -85,6 +85,7 @@ static ssize_t module_vendor_string_show(struct device *dev,
                                         char *buf)
 {
        struct greybus_device *gdev = to_greybus_device(dev);
+
        return sprintf(buf, "%s",
                       greybus_string(gdev, gdev->module_id.vendor_stringid));
 }
@@ -95,6 +96,7 @@ static ssize_t module_product_string_show(struct device *dev,
                                         char *buf)
 {
        struct greybus_device *gdev = to_greybus_device(dev);
+
        return sprintf(buf, "%s",
                       greybus_string(gdev, gdev->module_id.product_stringid));
 }
@@ -141,6 +143,7 @@ static ssize_t serial_number_show(struct device *dev,
                                  struct device_attribute *attr, char *buf)
 {
        struct greybus_device *gdev = to_greybus_device(dev);
+
        return sprintf(buf, "%llX\n",
                      (unsigned long long)gdev->serial_number.serial_number);
 }
index d104d9c..896d501 100644 (file)
@@ -245,8 +245,7 @@ static int get_serial_info(struct gb_tty *gb_tty,
 
        if (copy_to_user(info, &tmp, sizeof(tmp)))
                return -EFAULT;
-       else
-               return 0;
+       return 0;
 }
 
 static int set_serial_info(struct gb_tty *gb_tty,