diff mbox series

[RFC,v2,1/7] i2c: apply coding style for struct i2c_adapter

Message ID 20190302134735.4393-2-wsa+renesas@sang-engineering.com
State Deferred
Headers show
Series i2c: core: introduce atomic transfers | expand

Commit Message

Wolfram Sang March 2, 2019, 1:47 p.m. UTC
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 include/linux/i2c.h | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

Comments

Simon Horman March 15, 2019, 12:15 p.m. UTC | #1
On Sat, Mar 02, 2019 at 02:47:29PM +0100, Wolfram Sang wrote:
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

> ---
>  include/linux/i2c.h | 23 +++++++++++++----------
>  1 file changed, 13 insertions(+), 10 deletions(-)
> 
> diff --git a/include/linux/i2c.h b/include/linux/i2c.h
> index 383510b4f083..758a6db864c9 100644
> --- a/include/linux/i2c.h
> +++ b/include/linux/i2c.h
> @@ -517,20 +517,23 @@ i2c_register_board_info(int busnum, struct i2c_board_info const *info,
>   * Documentation file Documentation/i2c/fault-codes.
>   */
>  struct i2c_algorithm {
> -	/* If an adapter algorithm can't do I2C-level access, set master_xfer
> -	   to NULL. If an adapter algorithm can do SMBus access, set
> -	   smbus_xfer. If set to NULL, the SMBus protocol is simulated
> -	   using common I2C messages */
> -	/* master_xfer should return the number of messages successfully
> -	   processed, or a negative value on error */
> +	/*
> +	 * If an adapter algorithm can't do I2C-level access, set master_xfer
> +	 * to NULL. If an adapter algorithm can do SMBus access, set
> +	 * smbus_xfer. If set to NULL, the SMBus protocol is simulated
> +	 * using common I2C messages.
> +	 *
> +	 * master_xfer should return the number of messages successfully
> +	 * processed, or a negative value on error
> +	 */
>  	int (*master_xfer)(struct i2c_adapter *adap, struct i2c_msg *msgs,
>  			   int num);
> -	int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
> -			   unsigned short flags, char read_write,
> -			   u8 command, int size, union i2c_smbus_data *data);
> +	int (*smbus_xfer)(struct i2c_adapter *adap, u16 addr,
> +			  unsigned short flags, char read_write,
> +			  u8 command, int size, union i2c_smbus_data *data);
>  
>  	/* To determine what the adapter supports */
> -	u32 (*functionality) (struct i2c_adapter *);
> +	u32 (*functionality)(struct i2c_adapter *adap);
>  
>  #if IS_ENABLED(CONFIG_I2C_SLAVE)
>  	int (*reg_slave)(struct i2c_client *client);
> -- 
> 2.11.0
>
Wolfram Sang March 27, 2019, 1:15 p.m. UTC | #2
On Sat, Mar 02, 2019 at 02:47:29PM +0100, Wolfram Sang wrote:
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

I think this preparational patch can be applied right away.
Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 383510b4f083..758a6db864c9 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -517,20 +517,23 @@  i2c_register_board_info(int busnum, struct i2c_board_info const *info,
  * Documentation file Documentation/i2c/fault-codes.
  */
 struct i2c_algorithm {
-	/* If an adapter algorithm can't do I2C-level access, set master_xfer
-	   to NULL. If an adapter algorithm can do SMBus access, set
-	   smbus_xfer. If set to NULL, the SMBus protocol is simulated
-	   using common I2C messages */
-	/* master_xfer should return the number of messages successfully
-	   processed, or a negative value on error */
+	/*
+	 * If an adapter algorithm can't do I2C-level access, set master_xfer
+	 * to NULL. If an adapter algorithm can do SMBus access, set
+	 * smbus_xfer. If set to NULL, the SMBus protocol is simulated
+	 * using common I2C messages.
+	 *
+	 * master_xfer should return the number of messages successfully
+	 * processed, or a negative value on error
+	 */
 	int (*master_xfer)(struct i2c_adapter *adap, struct i2c_msg *msgs,
 			   int num);
-	int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
-			   unsigned short flags, char read_write,
-			   u8 command, int size, union i2c_smbus_data *data);
+	int (*smbus_xfer)(struct i2c_adapter *adap, u16 addr,
+			  unsigned short flags, char read_write,
+			  u8 command, int size, union i2c_smbus_data *data);
 
 	/* To determine what the adapter supports */
-	u32 (*functionality) (struct i2c_adapter *);
+	u32 (*functionality)(struct i2c_adapter *adap);
 
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
 	int (*reg_slave)(struct i2c_client *client);