lkml.org 
[lkml]   [2019]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 1/3] driver core: platform: Add an error message to platform_get_irq*()
From
Date

> +++ 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

\
 
 \ /
  Last update: 2019-07-30 14:31    [W:0.145 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site