iio: as3935: allocate correct iio_device size

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
George McCollister 2014-10-31 15:44:00 +00:00 committed by Jonathan Cameron
parent 25afffe16d
commit f73cde600d

View File

@ -330,7 +330,7 @@ static int as3935_probe(struct spi_device *spi)
return -EINVAL;
}
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(st));
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
if (!indio_dev)
return -ENOMEM;