From ede7e59086ca1b6345764bb1daa0afdce235f573 Mon Sep 17 00:00:00 2001 From: Venkata Rao Kakani Date: Fri, 28 May 2021 18:29:50 +0530 Subject: [PATCH] drivers: rename-block: support DP and No DP configuration Supporting renaming of partitions in DP and NON DP Configurations. Change-Id: I1908d7e76157fa3e31378ea2981669379b2fca6b Signed-off-by: Venkata Rao Kakani --- drivers/soc/qcom/rename_block_device.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/soc/qcom/rename_block_device.c b/drivers/soc/qcom/rename_block_device.c index 81500f1650bf..13aeb4499e66 100644 --- a/drivers/soc/qcom/rename_block_device.c +++ b/drivers/soc/qcom/rename_block_device.c @@ -66,21 +66,22 @@ static int rename_blk_dev_init(void) dev = name_to_dev_t(dev_path); if (!dev) { pr_err("No device path : %s\n", dev_path); - return -EINVAL; + goto out; } disk = get_gendisk(dev, &partno); if (!disk) { pr_err("No device with dev path : %s\n", dev_path); - return -ENXIO; + goto out; } - if (!of_property_read_string_index(node, "rename-dev", index, - (const char **)&modified_name)) { + if (!of_property_read_string_index(node, dp_enabled ? + "rename-dev-ab" : "rename-dev", + index, (const char **)&modified_name)) { get_slot_updated_name(modified_name); device_rename(disk_to_dev(disk), final_name); } else { pr_err("rename-dev for actual-dev = %s is missing\n", actual_name); - return -ENXIO; + goto out; } index++; }