diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2016-05-28 16:02:50 -0400 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2016-06-03 08:22:01 -0400 |
commit | 3993546646baf1dab5f5c4f7d9bb58f2046fd1c1 (patch) | |
tree | 3508a9a3d4d0b0e8dd7357abf9abbdac49c7b63f | |
parent | fcdec35e54dc8a7659f59482e23aad1fe9c3ef5a (diff) |
of: irq: fix of_irq_get[_byname]() kernel-doc
The kernel-doc for the of_irq_get[_byname]() is clearly inadequate in
describing the return values -- of_irq_get_byname() is documented better
than of_irq_get() but it still doesn't mention that 0 is returned iff
irq_create_of_mapping() fails (it doesn't return an error code in this
case). Document all possible return value variants, making the writing
of the word "IRQ" consistent, while at it...
Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Fixes: ad69674e73a1 ("of/irq: do irq resolution in platform_get_irq_byname()")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
CC: stable@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r-- | drivers/of/irq.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c index e7bfc175b8e1..6ec743faabe8 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c | |||
@@ -386,13 +386,13 @@ int of_irq_to_resource(struct device_node *dev, int index, struct resource *r) | |||
386 | EXPORT_SYMBOL_GPL(of_irq_to_resource); | 386 | EXPORT_SYMBOL_GPL(of_irq_to_resource); |
387 | 387 | ||
388 | /** | 388 | /** |
389 | * of_irq_get - Decode a node's IRQ and return it as a Linux irq number | 389 | * of_irq_get - Decode a node's IRQ and return it as a Linux IRQ number |
390 | * @dev: pointer to device tree node | 390 | * @dev: pointer to device tree node |
391 | * @index: zero-based index of the irq | 391 | * @index: zero-based index of the IRQ |
392 | * | ||
393 | * Returns Linux irq number on success, or -EPROBE_DEFER if the irq domain | ||
394 | * is not yet created. | ||
395 | * | 392 | * |
393 | * Returns Linux IRQ number on success, or 0 on the IRQ mapping failure, or | ||
394 | * -EPROBE_DEFER if the IRQ domain is not yet created, or error code in case | ||
395 | * of any other failure. | ||
396 | */ | 396 | */ |
397 | int of_irq_get(struct device_node *dev, int index) | 397 | int of_irq_get(struct device_node *dev, int index) |
398 | { | 398 | { |
@@ -413,12 +413,13 @@ int of_irq_get(struct device_node *dev, int index) | |||
413 | EXPORT_SYMBOL_GPL(of_irq_get); | 413 | EXPORT_SYMBOL_GPL(of_irq_get); |
414 | 414 | ||
415 | /** | 415 | /** |
416 | * of_irq_get_byname - Decode a node's IRQ and return it as a Linux irq number | 416 | * of_irq_get_byname - Decode a node's IRQ and return it as a Linux IRQ number |
417 | * @dev: pointer to device tree node | 417 | * @dev: pointer to device tree node |
418 | * @name: irq name | 418 | * @name: IRQ name |
419 | * | 419 | * |
420 | * Returns Linux irq number on success, or -EPROBE_DEFER if the irq domain | 420 | * Returns Linux IRQ number on success, or 0 on the IRQ mapping failure, or |
421 | * is not yet created, or error code in case of any other failure. | 421 | * -EPROBE_DEFER if the IRQ domain is not yet created, or error code in case |
422 | * of any other failure. | ||
422 | */ | 423 | */ |
423 | int of_irq_get_byname(struct device_node *dev, const char *name) | 424 | int of_irq_get_byname(struct device_node *dev, const char *name) |
424 | { | 425 | { |