iio: core: move debugfs data on the private iio dev info
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Tue, 30 Jun 2020 04:57:05 +0000 (07:57 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 7 Jul 2020 19:24:06 +0000 (20:24 +0100)
commit96fb1b67422ed652e3217a140cf9be505041db07
treece05f3eb50ec64c4caaf2a20f65fb554d5734aff
parent09673d5e1b12c89988270890587a6d09d4d95e8c
iio: core: move debugfs data on the private iio dev info

This change moves all iio_dev debugfs fields to the iio_dev_priv object.
It's not the biggest advantage yet (to the whole thing of abstractization)
but it's a start.

The iio_get_debugfs_dentry() function (which is moved in
industrialio-core.c) needs to also be guarded against the CONFIG_DEBUG_FS
symbol, when it isn't defined. We do want to keep the inline definition in
the iio.h header, so that the compiler can better infer when to compile out
debugfs code that is related to the IIO debugfs directory.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-core.c
include/linux/iio/iio-opaque.h
include/linux/iio/iio.h