diff mbox

[12/13] staging: iio: tsl2x7x: put function definitions on a single line

Message ID 20171019200632.25820-13-masneyb@onstation.org (mailing list archive)
State New, archived
Headers show

Commit Message

Brian Masney Oct. 19, 2017, 8:06 p.m. UTC
The functions tsl2x7x_invoke_change() and tsl2x7x_prox_calculate() are
short enough that the return value and static declaration can be moved
onto the same line with the function name. This patch makes that change
to increase code readability.

Signed-off-by: Brian Masney <masneyb@onstation.org>
---
 drivers/staging/iio/light/tsl2x7x.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Jonathan Cameron Oct. 21, 2017, 5:45 p.m. UTC | #1
On Thu, 19 Oct 2017 16:06:31 -0400
Brian Masney <masneyb@onstation.org> wrote:

> The functions tsl2x7x_invoke_change() and tsl2x7x_prox_calculate() are
> short enough that the return value and static declaration can be moved
> onto the same line with the function name. This patch makes that change
> to increase code readability.
> 
> Signed-off-by: Brian Masney <masneyb@onstation.org>
Applied.
> ---
>  drivers/staging/iio/light/tsl2x7x.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c
> index f12ab1239a46..42ed9c015aaf 100644
> --- a/drivers/staging/iio/light/tsl2x7x.c
> +++ b/drivers/staging/iio/light/tsl2x7x.c
> @@ -752,8 +752,7 @@ static int tsl2x7x_chip_off(struct iio_dev *indio_dev)
>   * put device back into proper state, and unlock
>   * resource.
>   */
> -static
> -int tsl2x7x_invoke_change(struct iio_dev *indio_dev)
> +static int tsl2x7x_invoke_change(struct iio_dev *indio_dev)
>  {
>  	struct tsl2X7X_chip *chip = iio_priv(indio_dev);
>  	int device_status = chip->tsl2x7x_chip_status;
> @@ -777,9 +776,8 @@ int tsl2x7x_invoke_change(struct iio_dev *indio_dev)
>  	return ret;
>  }
>  
> -static
> -void tsl2x7x_prox_calculate(int *data, int length,
> -			    struct tsl2x7x_prox_stat *statP)
> +static void tsl2x7x_prox_calculate(int *data, int length,
> +				   struct tsl2x7x_prox_stat *statP)
>  {
>  	int i;
>  	int sample_sum;

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c
index f12ab1239a46..42ed9c015aaf 100644
--- a/drivers/staging/iio/light/tsl2x7x.c
+++ b/drivers/staging/iio/light/tsl2x7x.c
@@ -752,8 +752,7 @@  static int tsl2x7x_chip_off(struct iio_dev *indio_dev)
  * put device back into proper state, and unlock
  * resource.
  */
-static
-int tsl2x7x_invoke_change(struct iio_dev *indio_dev)
+static int tsl2x7x_invoke_change(struct iio_dev *indio_dev)
 {
 	struct tsl2X7X_chip *chip = iio_priv(indio_dev);
 	int device_status = chip->tsl2x7x_chip_status;
@@ -777,9 +776,8 @@  int tsl2x7x_invoke_change(struct iio_dev *indio_dev)
 	return ret;
 }
 
-static
-void tsl2x7x_prox_calculate(int *data, int length,
-			    struct tsl2x7x_prox_stat *statP)
+static void tsl2x7x_prox_calculate(int *data, int length,
+				   struct tsl2x7x_prox_stat *statP)
 {
 	int i;
 	int sample_sum;