]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0ecb76c50135d42e06798fb92a4dbacc92420fa4
tree713064c3bc56e99ccbb49f616b0830c1cd890c2e
parent7557238915a67b20a62eef25bb73aeda2e48281d
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