diff options
Diffstat (limited to 'drivers/i2c/algos/i2c-algo-sgi.c')
-rw-r--r-- | drivers/i2c/algos/i2c-algo-sgi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/i2c/algos/i2c-algo-sgi.c b/drivers/i2c/algos/i2c-algo-sgi.c index 422721b241e5..932c4fa86c73 100644 --- a/drivers/i2c/algos/i2c-algo-sgi.c +++ b/drivers/i2c/algos/i2c-algo-sgi.c | |||
@@ -149,7 +149,7 @@ static int sgi_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, | |||
149 | err = i2c_write(adap, p->buf, p->len); | 149 | err = i2c_write(adap, p->buf, p->len); |
150 | } | 150 | } |
151 | 151 | ||
152 | return err; | 152 | return (err < 0) ? err : i; |
153 | } | 153 | } |
154 | 154 | ||
155 | static u32 sgi_func(struct i2c_adapter *adap) | 155 | static u32 sgi_func(struct i2c_adapter *adap) |
@@ -158,8 +158,6 @@ static u32 sgi_func(struct i2c_adapter *adap) | |||
158 | } | 158 | } |
159 | 159 | ||
160 | static struct i2c_algorithm sgi_algo = { | 160 | static struct i2c_algorithm sgi_algo = { |
161 | .name = "SGI algorithm", | ||
162 | .id = I2C_ALGO_SGI, | ||
163 | .master_xfer = sgi_xfer, | 161 | .master_xfer = sgi_xfer, |
164 | .functionality = sgi_func, | 162 | .functionality = sgi_func, |
165 | }; | 163 | }; |
@@ -169,7 +167,6 @@ static struct i2c_algorithm sgi_algo = { | |||
169 | */ | 167 | */ |
170 | int i2c_sgi_add_bus(struct i2c_adapter *adap) | 168 | int i2c_sgi_add_bus(struct i2c_adapter *adap) |
171 | { | 169 | { |
172 | adap->id |= sgi_algo.id; | ||
173 | adap->algo = &sgi_algo; | 170 | adap->algo = &sgi_algo; |
174 | 171 | ||
175 | return i2c_add_adapter(adap); | 172 | return i2c_add_adapter(adap); |