summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap/am33xx_bbu_emmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap/am33xx_bbu_emmc.c')
-rw-r--r--arch/arm/mach-omap/am33xx_bbu_emmc.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/arm/mach-omap/am33xx_bbu_emmc.c b/arch/arm/mach-omap/am33xx_bbu_emmc.c
index 29e13de778..3cae31d34c 100644
--- a/arch/arm/mach-omap/am33xx_bbu_emmc.c
+++ b/arch/arm/mach-omap/am33xx_bbu_emmc.c
@@ -18,7 +18,7 @@
#include <fs.h>
#include <fcntl.h>
#include <filetype.h>
-#include <mach/bbu.h>
+#include <mach/omap/bbu.h>
#define PART_TABLE_SIZE 66
#define PART_TABLE_OFFSET 0x1BE
@@ -42,16 +42,15 @@ static int emmc_mlo_handler(struct bbu_handler *handler, struct bbu_data *data)
fd = open(handler->devicefile, O_RDWR);
if (fd < 0) {
- pr_err("could not open %s: %s\n", handler->devicefile,
- errno_str());
+ pr_err("could not open %s: %m\n", handler->devicefile);
return fd;
}
/* save the partition table */
ret = pread(fd, part_table, PART_TABLE_SIZE, PART_TABLE_OFFSET);
if (ret < 0) {
- pr_err("could not read partition table from fd %s: %s\n",
- handler->devicefile, errno_str());
+ pr_err("could not read partition table from fd %s: %m\n",
+ handler->devicefile);
goto error;
}
@@ -59,8 +58,8 @@ static int emmc_mlo_handler(struct bbu_handler *handler, struct bbu_data *data)
for (i = 0; i < 4; i++) {
ret = pwrite(fd, image, size, i * 0x20000);
if (ret < 0) {
- pr_err("could not write MLO %i/4 to fd %s: %s\n",
- i + 1, handler->devicefile, errno_str());
+ pr_err("could not write MLO %i/4 to fd %s: %m\n",
+ i + 1, handler->devicefile);
goto error_save_part_table;
}
}
@@ -69,8 +68,8 @@ error_save_part_table:
/* write the partition table back */
ret = pwrite(fd, part_table, PART_TABLE_SIZE, PART_TABLE_OFFSET);
if (ret < 0)
- pr_err("could not write partition table to fd %s: %s\n",
- handler->devicefile, errno_str());
+ pr_err("could not write partition table to fd %s: %m\n",
+ handler->devicefile);
error:
close(fd);