aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r--drivers/iio/adc/mcp3422.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/iio/adc/mcp3422.c b/drivers/iio/adc/mcp3422.c
index 12948325431c..dbdbd77f69ea 100644
--- a/drivers/iio/adc/mcp3422.c
+++ b/drivers/iio/adc/mcp3422.c
@@ -362,7 +362,7 @@ static int mcp3422_probe(struct i2c_client *client,
362 | MCP3422_SAMPLE_RATE_VALUE(MCP3422_SRATE_240)); 362 | MCP3422_SAMPLE_RATE_VALUE(MCP3422_SRATE_240));
363 mcp3422_update_config(adc, config); 363 mcp3422_update_config(adc, config);
364 364
365 err = iio_device_register(indio_dev); 365 err = devm_iio_device_register(&client->dev, indio_dev);
366 if (err < 0) 366 if (err < 0)
367 return err; 367 return err;
368 368
@@ -371,12 +371,6 @@ static int mcp3422_probe(struct i2c_client *client,
371 return 0; 371 return 0;
372} 372}
373 373
374static int mcp3422_remove(struct i2c_client *client)
375{
376 iio_device_unregister(i2c_get_clientdata(client));
377 return 0;
378}
379
380static const struct i2c_device_id mcp3422_id[] = { 374static const struct i2c_device_id mcp3422_id[] = {
381 { "mcp3422", 2 }, 375 { "mcp3422", 2 },
382 { "mcp3423", 3 }, 376 { "mcp3423", 3 },
@@ -400,7 +394,6 @@ static struct i2c_driver mcp3422_driver = {
400 .of_match_table = of_match_ptr(mcp3422_of_match), 394 .of_match_table = of_match_ptr(mcp3422_of_match),
401 }, 395 },
402 .probe = mcp3422_probe, 396 .probe = mcp3422_probe,
403 .remove = mcp3422_remove,
404 .id_table = mcp3422_id, 397 .id_table = mcp3422_id,
405}; 398};
406module_i2c_driver(mcp3422_driver); 399module_i2c_driver(mcp3422_driver);