diff options
author | Matt Fleming <matt.fleming@linux.intel.com> | 2011-07-13 11:44:10 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@linux.intel.com> | 2011-07-28 12:22:32 +0100 |
commit | aaf56a110683a6f46ad255a5065aa057161b02b6 (patch) | |
tree | 9c8ee57509c23cb4023c7ef5ae5a2df23d92b4f3 | |
parent | a2821f29fdf972f73f1ff208311704422c7f3386 (diff) | |
download | efilinux-aaf56a110683a6f46ad255a5065aa057161b02b6.tar.gz |
protocol.h: Add locate_protocol()
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
-rw-r--r-- | protocol.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -51,6 +51,19 @@ handle_protocol(EFI_HANDLE handle, EFI_GUID *protocol, void **interface) } /** + * locate_protocol - Returns the first protocol instance for @protocol + * @protocol: the protocol to search for + * @registration: optional registration key + * @interface: used to return a pointer to the first matching interface + */ +static inline EFI_STATUS +locate_protocol(EFI_GUID *protocol, void *registration, void **interface) +{ + return uefi_call_wrapper(boot->LocateProtocol, 3, protocol, + registration, interface); +} + +/** * locate_handle - Search for handles that support @protocol * @type: the search type, which handles are returned * @protocol: the protocol to search by (only valid if @type is ByProtocol) |