#include <part.h>
#include <malloc.h>
#include <memalign.h>
+#include <linux/err.h>
enum bcb_cmd {
BCB_CMD_LOAD,
goto err_read_fail;
}
+ /*
+ * always select the USER mmc hwpart in case another
+ * blk operation selected a different hwpart
+ */
+ ret = blk_dselect_hwpart(desc, 0);
+ if (IS_ERR_VALUE(ret)) {
+ ret = -ENODEV;
+ goto err_read_fail;
+ }
+
part = simple_strtoul(partp, &endp, 0);
if (*endp == '\0') {
ret = part_get_info(desc, part, &info);