Explorar o código

iio:adc:at91-sama5d2: code cleanup

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>
Ludovic Desroches %!s(int64=9) %!d(string=hai) anos
pai
achega
61be8fde63
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      drivers/iio/adc/at91-sama5d2_adc.c

+ 1 - 2
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;