#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
*
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 */
/**
* efi_bl_bind() - bind to a block io protocol
*
+ * @this: driver binding protocol
* @handle: handle
* @interface: block io protocol
* Return: status code
*/
-static efi_status_t efi_bl_bind(efi_handle_t handle, void *interface)
+static efi_status_t efi_bl_bind(
+ struct efi_driver_binding_extended_protocol *this,
+ efi_handle_t handle, void *interface)
{
efi_status_t ret = EFI_SUCCESS;
struct efi_object *obj = efi_search_obj(handle);
ret = check_node_type(controller_handle);
if (ret != EFI_SUCCESS)
goto err;
- ret = bp->ops->bind(controller_handle, interface);
+ ret = bp->ops->bind(bp, controller_handle, interface);
if (ret == EFI_SUCCESS)
goto out;