iio: accel: adxl345: Reorder probe initialization
authorLothar Rubusch <l.rubusch@gmail.com>
Mon, 1 Apr 2024 19:49:04 +0000 (19:49 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 6 Apr 2024 15:18:39 +0000 (16:18 +0100)
commit196fb733e5e6c4f05e208ad31c4155cd525750e9
tree245fee94698d4fa6cbf148488acc683a8384dc23
parent41561abc417eb92b38631cb05427fecbfeec19cb
iio: accel: adxl345: Reorder probe initialization

Bring indio_dev, setup() and data initialization to begin of the probe()
function to increase readability. Access members through data
pointer to assure implicitely the driver's data instance is correctly
initialized and functional.

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Link: https://lore.kernel.org/r/20240401194906.56810-7-l.rubusch@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/adxl345_core.c