iio: imu: adis16460: use DEFINE_DEBUGFS_ATTRIBUTE instead of DEFINE_SIMPLE_ATTRIBUTE
authorRohit Sarkar <rohitsarkar5398@gmail.com>
Tue, 31 Mar 2020 11:47:31 +0000 (17:17 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 19 Apr 2020 15:56:25 +0000 (16:56 +0100)
commit2ca73823d05d654cb6d21bd0b045dfa382fb9c83
tree713064c3bc56e99ccbb49f616b0830c1cd890c2e
parentae1d37a9bb4bd8d9091a40d153143e99b115ee37
iio: imu: adis16460: use DEFINE_DEBUGFS_ATTRIBUTE instead of DEFINE_SIMPLE_ATTRIBUTE

debugfs_create_file_unsafe does not protect the fops handed to it
against file removal. DEFINE_DEBUGFS_ATTRIBUTE makes the fops aware of
the file lifetime and thus protects it against removal.

Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com>
Tested-by Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/adis16460.c