[U-Boot] [RFC v2 07/15] efi_loader: unicode_collation: converted to DM
AKASHI Takahiro
takahiro.akashi at linaro.org
Fri Feb 8 08:15:34 UTC 2019
Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
lib/efi_loader/efi_unicode_collation.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/lib/efi_loader/efi_unicode_collation.c b/lib/efi_loader/efi_unicode_collation.c
index 7f3ea3c77e4e..9b47693d3ee5 100644
--- a/lib/efi_loader/efi_unicode_collation.c
+++ b/lib/efi_loader/efi_unicode_collation.c
@@ -9,6 +9,7 @@
#include <charset.h>
#include <cp1250.h>
#include <cp437.h>
+#include <dm.h>
#include <efi_loader.h>
/* Characters that may not be used in file names */
@@ -327,3 +328,21 @@ const struct efi_unicode_collation_protocol efi_unicode_collation_protocol = {
.str_to_fat = efi_str_to_fat,
.supported_languages = "en",
};
+
+static int efi_unicode_collation_probe(struct udevice *dev)
+{
+ struct efi_handler *handler;
+ struct efi_unicode_collation_protocol *col;
+
+ handler = dev->uclass_platdata;
+ col = handler->protocol_interface;
+ device_set_name(dev, col->supported_languages);
+
+ return 0;
+}
+
+U_BOOT_DRIVER(efi_unicode_collation) = {
+ .name = "efi_unicode_collation",
+ .id = UCLASS_EFI_PROTOCOL,
+ .probe = efi_unicode_collation_probe,
+};
--
2.19.1
More information about the U-Boot
mailing list