#
548eb81d |
| 19-Sep-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
iio: trigger: iio-trig-interrupt: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's p
iio: trigger: iio-trig-interrupt: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove().
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230919174931.1417681-49-u.kleine-koenig@pengutronix.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
show more ...
|
#
2d323927 |
| 31-Oct-2021 |
Lars-Peter Clausen <lars@metafoo.de> |
iio: interrupt-trigger: Remove no-op trigger ops
The IIO core handles a trigger ops with all NULL callbacks the same as if the trigger ops itself was NULL.
Remove the empty trigger ops from the int
iio: interrupt-trigger: Remove no-op trigger ops
The IIO core handles a trigger ops with all NULL callbacks the same as if the trigger ops itself was NULL.
Remove the empty trigger ops from the interrupt trigger driver to slightly reduce the boilerplate code. Object size of the driver module is also slightly reduced.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211031142130.20791-1-lars@metafoo.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
show more ...
|
#
995071d3 |
| 09-Mar-2021 |
Gwendal Grignou <gwendal@chromium.org> |
iio: set default trig->dev.parent
When allocated with [devm_]iio_trigger_alloc(), set trig device parent to the device the trigger is allocated for by default.
It can always be reassigned in the pr
iio: set default trig->dev.parent
When allocated with [devm_]iio_trigger_alloc(), set trig device parent to the device the trigger is allocated for by default.
It can always be reassigned in the probe routine.
Change iio_trigger_alloc() API to add the device pointer to be coherent with devm_iio_trigger_alloc, using similar interface to iio_device_alloc().
Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210309193620.2176163-2-gwendal@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
show more ...
|
#
d2912cb1 |
| 04-Jun-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of th
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation #
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 4122 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
38ebbf68 |
| 23-Jul-2017 |
Jonathan Cameron <jic23@kernel.org> |
iio:triggers: drop assign iio_info.driver_module and iio_trigger_ops.owner
The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structu
iio:triggers: drop assign iio_info.driver_module and iio_trigger_ops.owner
The equivalent of both of these are now done via macro magic when the relevant register calls are made. The actual structure elements will shortly go away.
Note that stm32-timer-trigger has expanded rather beyond triggers (to include encoder input counting for example) and hence has an iio_info structure.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
show more ...
|
#
10e840df |
| 20-Jan-2017 |
Alison Schofield <amsfield22@gmail.com> |
iio: trigger: free trigger resource correctly
These stand-alone trigger drivers were using iio_trigger_put() where they should have been using iio_trigger_free(). The iio_trigger_put() adds a modul
iio: trigger: free trigger resource correctly
These stand-alone trigger drivers were using iio_trigger_put() where they should have been using iio_trigger_free(). The iio_trigger_put() adds a module_put which is bad since they never did a module_get.
In the sysfs driver, module_get/put's are used as triggers are added & removed. This extra module_put() occurs on an error path in the probe routine (probably rare).
In the bfin-timer & interrupt trigger drivers, the module resources are not explicitly managed, so it's doing a put on something that was never get'd. It occurs on the probe error path and on the remove path (not so rare).
Tested with the sysfs trigger driver. The bfin & interrupt drivers were build tested & inspected only.
Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
show more ...
|
#
81816aff |
| 20-Aug-2014 |
Sanjeev Sharma <sanjeev_sharma@mentor.com> |
iio: remove .owner field for driver using module_platform_driver
This patch removes the .owner field for drivers which use the platform_driver_register api because this is overriden in _platform_dri
iio: remove .owner field for driver using module_platform_driver
This patch removes the .owner field for drivers which use the platform_driver_register api because this is overriden in _platform_driver_register.
Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
show more ...
|
#
398fd22b |
| 06-Dec-2014 |
Peter Meerwald <pmeerw@pmeerw.net> |
iio: Remove timestamp argument from iio_trigger_poll() and iio_trigger_poll_chained()
argument has been ignored; adjust drivers accordingly
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-
iio: Remove timestamp argument from iio_trigger_poll() and iio_trigger_poll_chained()
argument has been ignored; adjust drivers accordingly
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
show more ...
|
#
78f304d0 |
| 06-Jun-2013 |
Jonathan Cameron <jic23@kernel.org> |
iio:trigger:interrupt fix formatting of rsize variable in name
The name includes irq_res->start which of type resource_size_t not integer. We could in theory use %pa for this but then it would be in
iio:trigger:interrupt fix formatting of rsize variable in name
The name includes irq_res->start which of type resource_size_t not integer. We could in theory use %pa for this but then it would be in hex and also that causes a warning about incorrect types anyway. Hence just use the irq local variable we assigned the line above.
Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
show more ...
|
#
c7a8be08 |
| 02-Jun-2013 |
Jonathan Cameron <jic23@kernel.org> |
iio:triggers:interrupt trigger - move out of staging.
This is now a very simple trigger indeed but useful in many common cases.
Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-
iio:triggers:interrupt trigger - move out of staging.
This is now a very simple trigger indeed but useful in many common cases.
Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
show more ...
|