]> git.baikalelectronics.ru Git - kernel.git/commit
driver core: platform: Add platform_get_irq_byname_optional()
authorHans de Goede <hdegoede@redhat.com>
Sat, 5 Oct 2019 21:04:47 +0000 (23:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2019 10:52:44 +0000 (12:52 +0200)
commitad1a90dd388a4a5d3ed4f2ce01fe4125a4d6fbf0
tree755f6e8ae6dc1264b6f3ef679a19fb8fa704d23b
parenta2674c44ce4401dc6a4880d5987a6f3b04ad59a2
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>
drivers/base/platform.c
include/linux/platform_device.h