diff options
author | Heinrich Schuchardt | 2022-10-04 19:12:59 +0200 |
---|---|---|
committer | Heinrich Schuchardt | 2022-10-06 22:54:57 +0200 |
commit | ec4f675f9ebec2535f2cd050aed7f9c106a5bee9 (patch) | |
tree | 00902bb271904836edf8f45400ed3ce8ac378d36 /include/efi_driver.h | |
parent | 939f204c5a37e87052b1967cbd6971109b7176e7 (diff) |
efi_driver: provide driver binding protocol to bind function
DisconnectController() is based on the open protocol information created
when the driver opens a protocol with BY_CHILD_CONTROLLER or BY_DRIVER.
To create an open protocol information it is required to supply the handle
of the driver as agent handle. This information is available as field
DriverBindingHandle in the driver binding protocol.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'include/efi_driver.h')
-rw-r--r-- | include/efi_driver.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/include/efi_driver.h b/include/efi_driver.h index de38abe83bd..71e0d3194ea 100644 --- a/include/efi_driver.h +++ b/include/efi_driver.h @@ -11,6 +11,19 @@ #include <efi_loader.h> /** + * struct efi_driver_binding_extended_protocol - extended driver binding protocol + * + * This structure adds internal fields to the driver binding protocol. + * + * @bp: driver binding protocol + * @ops: operations supported by the driver + */ +struct efi_driver_binding_extended_protocol { + struct efi_driver_binding_protocol bp; + const struct efi_driver_ops *ops; +}; + +/** * struct efi_driver_ops - operations support by an EFI driver * * @protocol: The GUID of the protocol which is consumed by the @@ -25,20 +38,8 @@ struct efi_driver_ops { const efi_guid_t *protocol; const efi_guid_t *child_protocol; - efi_status_t (*bind)(efi_handle_t handle, void *interface); -}; - -/** - * struct efi_driver_binding_extended_protocol - extended driver binding protocol - * - * This structure adds internal fields to the driver binding protocol. - * - * @bp: driver binding protocol - * @ops: operations supported by the driver - */ -struct efi_driver_binding_extended_protocol { - struct efi_driver_binding_protocol bp; - const struct efi_driver_ops *ops; + efi_status_t (*bind)(struct efi_driver_binding_extended_protocol *this, + efi_handle_t handle, void *interface); }; #endif /* _EFI_DRIVER_H */ |