]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iio:adc:at91-sama5d2: code cleanup
authorLudovic Desroches <ludovic.desroches@atmel.com>
Mon, 18 Jan 2016 08:41:56 +0000 (09:41 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 23 Jan 2016 16:17:11 +0000 (16:17 +0000)
Use var type for sizeof argument instead of the struct name.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/at91-sama5d2_adc.c

index f2d8bd5deac9ce47db013085e4166b46933fb6cf..dbee13ad33a3c341777beb60715ec1f7007fd767 100644 (file)
@@ -353,8 +353,7 @@ static int at91_adc_probe(struct platform_device *pdev)
        struct resource *res;
        int ret;
 
-       indio_dev = devm_iio_device_alloc(&pdev->dev,
-                                         sizeof(struct at91_adc_state));
+       indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*st));
        if (!indio_dev)
                return -ENOMEM;