linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v5 1/3] driver core: platform: Add an error message to platform_get_irq*()
       [not found] ` <20190730053845.126834-2-swboyd@chromium.org>
@ 2019-07-30 12:30   ` Markus Elfring
  0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2019-07-30 12:30 UTC (permalink / raw)
  To: Stephen Boyd, Greg Kroah-Hartman, kernel-janitors, linux-doc
  Cc: linux-kernel, Rob Herring, Bartlomiej Zolnierkiewicz,
	Javier Martinez Canillas, Andrzej Hajda, Mark Brown,
	Russell King, Marek Szyprowski, Rafael J . Wysocki,
	Andy Shevchenko

…
> +++ b/drivers/base/platform.c
> @@ -163,6 +158,33 @@ int platform_get_irq(struct platform_device *dev, unsigned int num)
>  	return -ENXIO;
>  #endif
>  }
> +
> +/**
> + * platform_get_irq - get an IRQ for a device
> + * @dev: platform device
> + * @num: IRQ number index
> + *
> + * Gets an IRQ for a platform device and prints an error message if finding the
> + * IRQ fails. Device drivers should check the return value for errors so as to
> + * not pass a negative integer value to the request_irq() APIs.
> + *
> + * Example:
> + *		int irq = platform_get_irq(pdev, 0);
> + *		if (irq < 0)
> + *			return irq;
> + *
> + * Return: IRQ number on success, negative error number on failure.
> + */
…

Thanks for your extension of the description for this programming interface.

I imagine that adjustments for this software documentation format can make it
safer to extract desired API properties.
Would you like to improve provided information any further?

Regards,
Markus

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-30 12:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190730053845.126834-1-swboyd@chromium.org>
     [not found] ` <20190730053845.126834-2-swboyd@chromium.org>
2019-07-30 12:30   ` [PATCH v5 1/3] driver core: platform: Add an error message to platform_get_irq*() Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).