iodev->channels = lpc32xx_adc_iio_channels;
        iodev->num_channels = ARRAY_SIZE(lpc32xx_adc_iio_channels);
 
-       retval = iio_device_register(iodev);
+       retval = devm_iio_device_register(&pdev->dev, iodev);
        if (retval)
                return retval;
 
        return 0;
 }
 
-static int lpc32xx_adc_remove(struct platform_device *pdev)
-{
-       struct iio_dev *iodev = platform_get_drvdata(pdev);
-
-       iio_device_unregister(iodev);
-
-       return 0;
-}
-
 #ifdef CONFIG_OF
 static const struct of_device_id lpc32xx_adc_match[] = {
        { .compatible = "nxp,lpc3220-adc" },
 
 static struct platform_driver lpc32xx_adc_driver = {
        .probe          = lpc32xx_adc_probe,
-       .remove         = lpc32xx_adc_remove,
        .driver         = {
                .name   = MOD_NAME,
                .owner  = THIS_MODULE,