iio: core: drop iio_get_time_res()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 20 Feb 2022 16:33:27 +0000 (16:33 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 14 Jun 2022 10:53:09 +0000 (11:53 +0100)
This function was introduced with the ability to pick a clock.
There are no upstream users so presumably it isn't as obviously useful
as it seemed at the time.  Hence drop it.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20220220163327.424696-1-jic23@kernel.org
drivers/iio/industrialio-core.c
include/linux/iio/iio.h

index 7517dee..dd42df8 100644 (file)
@@ -334,29 +334,6 @@ s64 iio_get_time_ns(const struct iio_dev *indio_dev)
 }
 EXPORT_SYMBOL(iio_get_time_ns);
 
-/**
- * iio_get_time_res() - utility function to get time stamp clock resolution in
- *                      nano seconds.
- * @indio_dev: device
- */
-unsigned int iio_get_time_res(const struct iio_dev *indio_dev)
-{
-       switch (iio_device_get_clock(indio_dev)) {
-       case CLOCK_REALTIME:
-       case CLOCK_MONOTONIC:
-       case CLOCK_MONOTONIC_RAW:
-       case CLOCK_BOOTTIME:
-       case CLOCK_TAI:
-               return hrtimer_resolution;
-       case CLOCK_REALTIME_COARSE:
-       case CLOCK_MONOTONIC_COARSE:
-               return LOW_RES_NSEC;
-       default:
-               BUG();
-       }
-}
-EXPORT_SYMBOL(iio_get_time_res);
-
 static int __init iio_init(void)
 {
        int ret;
index 233d2e6..f6ea2ed 100644 (file)
@@ -313,7 +313,6 @@ static inline bool iio_channel_has_available(const struct iio_chan_spec *chan,
 }
 
 s64 iio_get_time_ns(const struct iio_dev *indio_dev);
-unsigned int iio_get_time_res(const struct iio_dev *indio_dev);
 
 /*
  * Device operating modes