driver core: platform: Add platform_get_irq_byname_optional()
Some drivers (e.g dwc3) first try to get an IRQ byname and then fall back to the one at index 0. In this case we do not want the error(s) printed by platform_get_irq_byname(). This commit adds a new platform_get_irq_byname_optional(), which does not print errors, for this. While at it also improve the kdoc text for platform_get_irq_byname() a bit. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205037 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/20191005210449.3926-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e2fbe60043
commit
f1da567f1d
2 changed files with 41 additions and 7 deletions
|
|
@ -64,6 +64,8 @@ extern struct resource *platform_get_resource_byname(struct platform_device *,
|
|||
unsigned int,
|
||||
const char *);
|
||||
extern int platform_get_irq_byname(struct platform_device *, const char *);
|
||||
extern int platform_get_irq_byname_optional(struct platform_device *dev,
|
||||
const char *name);
|
||||
extern int platform_add_devices(struct platform_device **, int);
|
||||
|
||||
struct platform_device_info {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue