diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-10-29 07:39:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-11-24 16:07:11 -0500 |
commit | a7e57dce02ceb8212f106191fdfbc0fcb61ce9e0 (patch) | |
tree | b3527156948f0a208869dfdf31a890ebfcc4261a /drivers/iio/industrialio-trigger.c | |
parent | 8caa07c0e565a15f49f290ca4c6a3adf968ddd38 (diff) |
iio: core: Move kernel doc to the right location
Documentation related to function should be placed above
its implementation. Move it accordingly.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/industrialio-trigger.c')
-rw-r--r-- | drivers/iio/industrialio-trigger.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c index bf5e70a32d3f..8bd092b9327e 100644 --- a/drivers/iio/industrialio-trigger.c +++ b/drivers/iio/industrialio-trigger.c | |||
@@ -506,6 +506,23 @@ static int devm_iio_trigger_match(struct device *dev, void *res, void *data) | |||
506 | return *r == data; | 506 | return *r == data; |
507 | } | 507 | } |
508 | 508 | ||
509 | /** | ||
510 | * devm_iio_trigger_alloc - Resource-managed iio_trigger_alloc() | ||
511 | * @dev: Device to allocate iio_trigger for | ||
512 | * @fmt: trigger name format. If it includes format | ||
513 | * specifiers, the additional arguments following | ||
514 | * format are formatted and inserted in the resulting | ||
515 | * string replacing their respective specifiers. | ||
516 | * | ||
517 | * Managed iio_trigger_alloc. iio_trigger allocated with this function is | ||
518 | * automatically freed on driver detach. | ||
519 | * | ||
520 | * If an iio_trigger allocated with this function needs to be freed separately, | ||
521 | * devm_iio_trigger_free() must be used. | ||
522 | * | ||
523 | * RETURNS: | ||
524 | * Pointer to allocated iio_trigger on success, NULL on failure. | ||
525 | */ | ||
509 | struct iio_trigger *devm_iio_trigger_alloc(struct device *dev, | 526 | struct iio_trigger *devm_iio_trigger_alloc(struct device *dev, |
510 | const char *fmt, ...) | 527 | const char *fmt, ...) |
511 | { | 528 | { |
@@ -532,6 +549,13 @@ struct iio_trigger *devm_iio_trigger_alloc(struct device *dev, | |||
532 | } | 549 | } |
533 | EXPORT_SYMBOL_GPL(devm_iio_trigger_alloc); | 550 | EXPORT_SYMBOL_GPL(devm_iio_trigger_alloc); |
534 | 551 | ||
552 | /** | ||
553 | * devm_iio_trigger_free - Resource-managed iio_trigger_free() | ||
554 | * @dev: Device this iio_dev belongs to | ||
555 | * @iio_trig: the iio_trigger associated with the device | ||
556 | * | ||
557 | * Free iio_trigger allocated with devm_iio_trigger_alloc(). | ||
558 | */ | ||
535 | void devm_iio_trigger_free(struct device *dev, struct iio_trigger *iio_trig) | 559 | void devm_iio_trigger_free(struct device *dev, struct iio_trigger *iio_trig) |
536 | { | 560 | { |
537 | int rc; | 561 | int rc; |