diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-04-14 11:35:04 -0700 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-04-22 11:34:14 +0100 |
commit | 9c6126940d646e441c292422c0b33902263c5425 (patch) | |
tree | 56279818faa74a384c171eb6fdbf7ab6896bccff /drivers | |
parent | b846676066ebf1d263d1c8fae4845ad4549e61e8 (diff) | |
download | linux-9c6126940d646e441c292422c0b33902263c5425.tar.bz2 |
iio: imx7d_adc: Use devm_iio_device_register()
Use devm_iio_device_register() and drop imx7d_adc_remove().
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: Chris Healy <cphealy@gmail.com>
Cc: linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/adc/imx7d_adc.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/iio/adc/imx7d_adc.c b/drivers/iio/adc/imx7d_adc.c index c5b0dc7d0e49..958a34dd88ac 100644 --- a/drivers/iio/adc/imx7d_adc.c +++ b/drivers/iio/adc/imx7d_adc.c @@ -554,7 +554,7 @@ static int imx7d_adc_probe(struct platform_device *pdev) if (ret) return ret; - ret = iio_device_register(indio_dev); + ret = devm_iio_device_register(dev, indio_dev); if (ret) { dev_err(&pdev->dev, "Couldn't register the device.\n"); return ret; @@ -563,21 +563,10 @@ static int imx7d_adc_probe(struct platform_device *pdev) return 0; } -static int imx7d_adc_remove(struct platform_device *pdev) -{ - struct iio_dev *indio_dev = platform_get_drvdata(pdev); - - iio_device_unregister(indio_dev); - - return 0; -} - - static SIMPLE_DEV_PM_OPS(imx7d_adc_pm_ops, imx7d_adc_disable, imx7d_adc_enable); static struct platform_driver imx7d_adc_driver = { .probe = imx7d_adc_probe, - .remove = imx7d_adc_remove, .driver = { .name = "imx7d_adc", .of_match_table = imx7d_adc_match, |