[PATCH 067/112] efi: block: move definitions into header file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We will need these definitions for the EFI loader as well, so move them
into a header.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/block/efi-block-io.c | 27 ---------------------------
 include/efi.h                | 27 +++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/block/efi-block-io.c b/drivers/block/efi-block-io.c
index 810b6da32d55..876b46c2d7a7 100644
--- a/drivers/block/efi-block-io.c
+++ b/drivers/block/efi-block-io.c
@@ -19,33 +19,6 @@
 #define EFI_BLOCK_IO_PROTOCOL_REVISION2 0x00020001
 #define EFI_BLOCK_IO_PROTOCOL_REVISION3 ((2<<16) | (31))
 
-struct efi_block_io_media{
-	u32 media_id;
-	bool removable_media;
-	bool media_present;
-	bool logical_partition;
-	bool read_only;
-	bool write_caching;
-	u32 block_size;
-	u32 io_align;
-	sector_t last_block;
-	u64 lowest_aligned_lba; /* added in Revision 2 */
-	u32 logical_blocks_per_physical_block; /* added in Revision 2 */
-	u32 optimal_transfer_length_granularity; /* added in Revision 3 */
-};
-
-struct efi_block_io_protocol {
-	u64 revision;
-	struct efi_block_io_media *media;
-	efi_status_t(EFIAPI *reset)(struct efi_block_io_protocol *this,
-			bool ExtendedVerification);
-	efi_status_t(EFIAPI *read)(struct efi_block_io_protocol *this, u32 media_id,
-			u64 lba, unsigned long buffer_size, void *buf);
-	efi_status_t(EFIAPI *write)(struct efi_block_io_protocol *this, u32 media_id,
-			u64 lba, unsigned long buffer_size, void *buf);
-	efi_status_t(EFIAPI *flush)(struct efi_block_io_protocol *this);
-};
-
 struct efi_bio_priv {
 	struct efi_block_io_protocol *protocol;
 	struct device *dev;
diff --git a/include/efi.h b/include/efi.h
index 18583bf62594..2e34c6be068a 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -655,6 +655,33 @@ __attribute__((noreturn)) void efi_main(efi_handle_t, struct efi_system_table *)
  */
 #define EFI_VARIABLE_GUID_LEN 36
 
+struct efi_block_io_media{
+	u32 media_id;
+	bool removable_media;
+	bool media_present;
+	bool logical_partition;
+	bool read_only;
+	bool write_caching;
+	u32 block_size;
+	u32 io_align;
+	sector_t last_block;
+	u64 lowest_aligned_lba; /* added in Revision 2 */
+	u32 logical_blocks_per_physical_block; /* added in Revision 2 */
+	u32 optimal_transfer_length_granularity; /* added in Revision 3 */
+};
+
+struct efi_block_io_protocol {
+	u64 revision;
+	struct efi_block_io_media *media;
+	efi_status_t(EFIAPI *reset)(struct efi_block_io_protocol *this,
+			bool ExtendedVerification);
+	efi_status_t(EFIAPI *read)(struct efi_block_io_protocol *this, u32 media_id,
+			u64 lba, unsigned long buffer_size, void *buf);
+	efi_status_t(EFIAPI *write)(struct efi_block_io_protocol *this, u32 media_id,
+			u64 lba, unsigned long buffer_size, void *buf);
+	efi_status_t(EFIAPI *flush)(struct efi_block_io_protocol *this);
+};
+
 struct simple_text_output_mode {
 	s32 max_mode;
 	s32 mode;
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux