From: Ludovic Desroches Date: Mon, 18 Jan 2016 08:41:56 +0000 (+0100) Subject: iio:adc:at91-sama5d2: code cleanup X-Git-Tag: v5.15~14007^2~1562^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61be8fde635bf4f7eecaf06af23e7db3c318596a;p=platform%2Fkernel%2Flinux-starfive.git iio:adc:at91-sama5d2: code cleanup Use var type for sizeof argument instead of the struct name. Signed-off-by: Ludovic Desroches Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c index f2d8bd5..dbee13a 100644 --- a/drivers/iio/adc/at91-sama5d2_adc.c +++ b/drivers/iio/adc/at91-sama5d2_adc.c @@ -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;