[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240921181939.392517-3-vassilisamir@gmail.com>
Date: Sat, 21 Sep 2024 20:19:39 +0200
From: Vasileios Amoiridis <vassilisamir@...il.com>
To: jic23@...nel.org,
lars@...afoo.de,
mazziesaccount@...il.com
Cc: linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Vasileios Amoiridis <vassilisamir@...il.com>
Subject: [PATCH v1 2/2] iio: remove iio_validate_own_trigger() completely
Remove completely the iio_validate_own_trigger() since it is not used
any more and since the iio_trigger_validate_own_device() can fully
replace the function.
Signed-off-by: Vasileios Amoiridis <vassilisamir@...il.com>
---
drivers/iio/industrialio-trigger.c | 20 --------------------
include/linux/iio/trigger.h | 1 -
2 files changed, 21 deletions(-)
diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
index 3da8b8c25185..b980843b5a3c 100644
--- a/drivers/iio/industrialio-trigger.c
+++ b/drivers/iio/industrialio-trigger.c
@@ -718,26 +718,6 @@ bool iio_trigger_using_own(struct iio_dev *indio_dev)
}
EXPORT_SYMBOL(iio_trigger_using_own);
-/**
- * iio_validate_own_trigger - Check if a trigger and IIO device belong to
- * the same device
- * @idev: the IIO device to check
- * @trig: the IIO trigger to check
- *
- * This function can be used as the validate_trigger callback for triggers that
- * can only be attached to their own device.
- *
- * Return: 0 if both the trigger and the IIO device belong to the same
- * device, -EINVAL otherwise.
- */
-int iio_validate_own_trigger(struct iio_dev *idev, struct iio_trigger *trig)
-{
- if (idev->dev.parent != trig->dev.parent)
- return -EINVAL;
- return 0;
-}
-EXPORT_SYMBOL_GPL(iio_validate_own_trigger);
-
/**
* iio_trigger_validate_own_device - Check if a trigger and IIO device belong to
* the same device
diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h
index bce3b1788199..51f52c5c6092 100644
--- a/include/linux/iio/trigger.h
+++ b/include/linux/iio/trigger.h
@@ -171,7 +171,6 @@ void iio_trigger_free(struct iio_trigger *trig);
*/
bool iio_trigger_using_own(struct iio_dev *indio_dev);
-int iio_validate_own_trigger(struct iio_dev *idev, struct iio_trigger *trig);
int iio_trigger_validate_own_device(struct iio_trigger *trig,
struct iio_dev *indio_dev);
--
2.25.1
Powered by blists - more mailing lists