[2/6] i2c: add identifier in declarations for i2c_bus_recovery

Message ID 20171204123640.3382-3-wsa+renesas@sang-engineering.com
State Superseded
Headers show
Series
  • i2c: send STOP after recovery; use it for i2c-rcar
Related show

Commit Message

Wolfram Sang Dec. 4, 2017, 12:36 p.m.
No reason to have them undefined, so let's add them.

Cc: Phil Reid <preid@electromag.com.au>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Claudio Foellmi <claudio.foellmi@ergon.ch>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 include/linux/i2c.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Andy Shevchenko Dec. 13, 2017, 3:23 p.m. | #1
On Mon, 2017-12-04 at 13:36 +0100, Wolfram Sang wrote:
> No reason to have them undefined, so let's add them.
> 

>  	int (*recover_bus)(struct i2c_adapter *);
>  
> -	int (*get_scl)(struct i2c_adapter *);
> -	void (*set_scl)(struct i2c_adapter *, int val);
> -	int (*get_sda)(struct i2c_adapter *);
> +	int (*get_scl)(struct i2c_adapter *adap);
> +	void (*set_scl)(struct i2c_adapter *adap, int val);
> +	int (*get_sda)(struct i2c_adapter *adap);
>  
>  	void (*prepare_recovery)(struct i2c_adapter *);
>  	void (*unprepare_recovery)(struct i2c_adapter *);

It seems inconsistent with the rest of the members even from this
visible piece.
Wolfram Sang Jan. 9, 2018, 11:17 a.m. | #2
On Wed, Dec 13, 2017 at 05:23:02PM +0200, Andy Shevchenko wrote:
> On Mon, 2017-12-04 at 13:36 +0100, Wolfram Sang wrote:
> > No reason to have them undefined, so let's add them.
> > 
> 
> >  	int (*recover_bus)(struct i2c_adapter *);
> >  
> > -	int (*get_scl)(struct i2c_adapter *);
> > -	void (*set_scl)(struct i2c_adapter *, int val);
> > -	int (*get_sda)(struct i2c_adapter *);
> > +	int (*get_scl)(struct i2c_adapter *adap);
> > +	void (*set_scl)(struct i2c_adapter *adap, int val);
> > +	int (*get_sda)(struct i2c_adapter *adap);
> >  
> >  	void (*prepare_recovery)(struct i2c_adapter *);
> >  	void (*unprepare_recovery)(struct i2c_adapter *);
> 
> It seems inconsistent with the rest of the members even from this
> visible piece.

Agreed. Either overlooked, or lost during rebase. Any way, will fix!

Patch

diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index f8a9d81e911e52..8a020617b4e780 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -561,9 +561,9 @@  struct i2c_timings {
 struct i2c_bus_recovery_info {
 	int (*recover_bus)(struct i2c_adapter *);
 
-	int (*get_scl)(struct i2c_adapter *);
-	void (*set_scl)(struct i2c_adapter *, int val);
-	int (*get_sda)(struct i2c_adapter *);
+	int (*get_scl)(struct i2c_adapter *adap);
+	void (*set_scl)(struct i2c_adapter *adap, int val);
+	int (*get_sda)(struct i2c_adapter *adap);
 
 	void (*prepare_recovery)(struct i2c_adapter *);
 	void (*unprepare_recovery)(struct i2c_adapter *);