diff options
Diffstat (limited to 'drivers/i2c/muxes/pca954x.c')
-rw-r--r-- | drivers/i2c/muxes/pca954x.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c index 6f9accf3189d..6f8953664636 100644 --- a/drivers/i2c/muxes/pca954x.c +++ b/drivers/i2c/muxes/pca954x.c | |||
@@ -181,8 +181,8 @@ static int pca954x_deselect_mux(struct i2c_adapter *adap, | |||
181 | /* | 181 | /* |
182 | * I2C init/probing/exit functions | 182 | * I2C init/probing/exit functions |
183 | */ | 183 | */ |
184 | static int __devinit pca954x_probe(struct i2c_client *client, | 184 | static int pca954x_probe(struct i2c_client *client, |
185 | const struct i2c_device_id *id) | 185 | const struct i2c_device_id *id) |
186 | { | 186 | { |
187 | struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent); | 187 | struct i2c_adapter *adap = to_i2c_adapter(client->dev.parent); |
188 | struct pca954x_platform_data *pdata = client->dev.platform_data; | 188 | struct pca954x_platform_data *pdata = client->dev.platform_data; |
@@ -201,10 +201,11 @@ static int __devinit pca954x_probe(struct i2c_client *client, | |||
201 | 201 | ||
202 | i2c_set_clientdata(client, data); | 202 | i2c_set_clientdata(client, data); |
203 | 203 | ||
204 | /* Read the mux register at addr to verify | 204 | /* Write the mux register at addr to verify |
205 | * that the mux is in fact present. | 205 | * that the mux is in fact present. This also |
206 | * initializes the mux to disconnected state. | ||
206 | */ | 207 | */ |
207 | if (i2c_smbus_read_byte(client) < 0) { | 208 | if (i2c_smbus_write_byte(client, 0) < 0) { |
208 | dev_warn(&client->dev, "probe failed\n"); | 209 | dev_warn(&client->dev, "probe failed\n"); |
209 | goto exit_free; | 210 | goto exit_free; |
210 | } | 211 | } |
@@ -255,7 +256,7 @@ err: | |||
255 | return ret; | 256 | return ret; |
256 | } | 257 | } |
257 | 258 | ||
258 | static int __devexit pca954x_remove(struct i2c_client *client) | 259 | static int pca954x_remove(struct i2c_client *client) |
259 | { | 260 | { |
260 | struct pca954x *data = i2c_get_clientdata(client); | 261 | struct pca954x *data = i2c_get_clientdata(client); |
261 | const struct chip_desc *chip = &chips[data->type]; | 262 | const struct chip_desc *chip = &chips[data->type]; |
@@ -279,7 +280,7 @@ static struct i2c_driver pca954x_driver = { | |||
279 | .owner = THIS_MODULE, | 280 | .owner = THIS_MODULE, |
280 | }, | 281 | }, |
281 | .probe = pca954x_probe, | 282 | .probe = pca954x_probe, |
282 | .remove = __devexit_p(pca954x_remove), | 283 | .remove = pca954x_remove, |
283 | .id_table = pca954x_id, | 284 | .id_table = pca954x_id, |
284 | }; | 285 | }; |
285 | 286 | ||