From: Greg Kroah-Hartman Date: Tue, 2 Sep 2014 02:10:06 +0000 (-0700) Subject: greybus: minor checkpatch cleanups X-Git-Tag: v5.15~12752^2~378^2~21^2~2146 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3be03d42cd02402a5aa41d8a55ae3597ef302667;p=platform%2Fkernel%2Flinux-starfive.git greybus: minor checkpatch cleanups --- diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index bbe9ef9..da62baf 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -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) diff --git a/drivers/staging/greybus/gpio-gb.c b/drivers/staging/greybus/gpio-gb.c index c4cb6a2..3428220 100644 --- a/drivers/staging/greybus/gpio-gb.c +++ b/drivers/staging/greybus/gpio-gb.c @@ -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) { diff --git a/drivers/staging/greybus/sysfs.c b/drivers/staging/greybus/sysfs.c index 16e6ca4..2393a6a 100644 --- a/drivers/staging/greybus/sysfs.c +++ b/drivers/staging/greybus/sysfs.c @@ -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); } diff --git a/drivers/staging/greybus/uart-gb.c b/drivers/staging/greybus/uart-gb.c index d104d9c..896d501 100644 --- a/drivers/staging/greybus/uart-gb.c +++ b/drivers/staging/greybus/uart-gb.c @@ -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,