OSDN Git Service

iio: amplifiers: ad8366: move channel init before iio_device_register()
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Mon, 21 May 2018 06:40:05 +0000 (09:40 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 22 May 2018 17:13:45 +0000 (18:13 +0100)
commit2636d005758928c2884ac610589f383c73919bcf
tree7326f2112232daeb0235f1453b0c4247c6af32b8
parent55dda0abcf9d36bf5c3e21c8423b7c00a1125e27
iio: amplifiers: ad8366: move channel init before iio_device_register()

Otherwise a race condition can occur, where userspace can start operations
before the channels have been properly initialized.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/amplifiers/ad8366.c