From 6fc580129f577ea59f837d62d8d764939ab04e08 Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Fri, 28 Apr 2017 14:46:02 +0200 Subject: arm: mach-omap: Change file flags in emmc handler This handler tries to read from a file descriptor with 'write only' flags and fails. Add read permissions for the file, so the handler can read the partition layout. Signed-off-by: Daniel Schultz Signed-off-by: Sascha Hauer --- arch/arm/mach-omap/am33xx_bbu_emmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap/am33xx_bbu_emmc.c b/arch/arm/mach-omap/am33xx_bbu_emmc.c index 3220575cd4..d3adb3744c 100644 --- a/arch/arm/mach-omap/am33xx_bbu_emmc.c +++ b/arch/arm/mach-omap/am33xx_bbu_emmc.c @@ -39,7 +39,7 @@ static int emmc_mlo_handler(struct bbu_handler *handler, struct bbu_data *data) if (ret != 0) return ret; - fd = open(handler->devicefile, O_WRONLY); + fd = open(handler->devicefile, O_RDWR); if (fd < 0) { pr_err("could not open %s: %s\n", handler->devicefile, errno_str()); -- cgit v1.2.3