diff --git a/disk/part.c b/disk/part.c
index 978b85c..9a78cce 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -267,7 +267,7 @@
 
 #ifdef HAVE_BLOCK_DEVICE
 
-void init_part(struct blk_desc *dev_desc)
+void part_init(struct blk_desc *dev_desc)
 {
 	struct part_driver *drv =
 		ll_entry_start(struct part_driver, part_driver);
@@ -329,7 +329,7 @@
 #endif /* any CONFIG_..._PARTITION */
 }
 
-void print_part(struct blk_desc *dev_desc)
+void part_print(struct blk_desc *dev_desc)
 {
 	struct part_driver *drv;
 
@@ -348,7 +348,7 @@
 
 #endif /* HAVE_BLOCK_DEVICE */
 
-int get_partition_info(struct blk_desc *dev_desc, int part,
+int part_get_info(struct blk_desc *dev_desc, int part,
 		       disk_partition_t *info)
 {
 #ifdef HAVE_BLOCK_DEVICE
@@ -432,7 +432,7 @@
 	 * already loaded.
 	 */
 	if(hwpart != 0)
-		init_part(*dev_desc);
+		part_init(*dev_desc);
 #endif
 
 cleanup:
@@ -607,7 +607,7 @@
 	 * other than "auto", use that partition number directly.
 	 */
 	if (part != PART_AUTO) {
-		ret = get_partition_info(*dev_desc, part, info);
+		ret = part_get_info(*dev_desc, part, info);
 		if (ret) {
 			printf("** Invalid partition %d **\n", part);
 			goto cleanup;
@@ -619,7 +619,7 @@
 		 */
 		part = 0;
 		for (p = 1; p <= MAX_SEARCH_PARTITIONS; p++) {
-			ret = get_partition_info(*dev_desc, p, info);
+			ret = part_get_info(*dev_desc, p, info);
 			if (ret)
 				continue;
 
diff --git a/disk/part_amiga.c b/disk/part_amiga.c
index 0f569f0..d323b4b 100644
--- a/disk/part_amiga.c
+++ b/disk/part_amiga.c
@@ -291,7 +291,7 @@
 /*
  * Get info about a partition
  */
-static int get_partition_info_amiga(struct blk_desc *dev_desc, int part,
+static int part_get_info_amiga(struct blk_desc *dev_desc, int part,
 				    disk_partition_t *info)
 {
     struct partition_block *p = find_partition(dev_desc, part-1);
@@ -382,7 +382,7 @@
 U_BOOT_PART_TYPE(amiga) = {
 	.name		= "AMIGA",
 	.part_type	= PART_TYPE_AMIGA,
-	.get_info	= get_partition_info_amiga,
+	.get_info	= part_get_info_amiga,
 	.print		= print_part_amiga,
 	.test		= test_part_amiga,
 };
diff --git a/disk/part_dos.c b/disk/part_dos.c
index 7567ed3..4a56391 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -167,11 +167,10 @@
 
 /*  Print a partition that is relative to its Extended partition table
  */
-static int get_partition_info_extended(struct blk_desc *dev_desc,
-				       lbaint_t ext_part_sector,
-				       lbaint_t relative, int part_num,
-				       int which_part, disk_partition_t *info,
-				       unsigned int disksig)
+static int part_get_info_extended(struct blk_desc *dev_desc,
+				  lbaint_t ext_part_sector, lbaint_t relative,
+				  int part_num, int which_part,
+				  disk_partition_t *info, unsigned int disksig)
 {
 	ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);
 	dos_partition_t *pt;
@@ -259,7 +258,7 @@
 			lbaint_t lba_start
 				= le32_to_int (pt->start4) + relative;
 
-			return get_partition_info_extended (dev_desc, lba_start,
+			return part_get_info_extended(dev_desc, lba_start,
 				 ext_part_sector == 0 ? lba_start : relative,
 				 part_num, which_part, info, disksig);
 		}
@@ -289,16 +288,16 @@
 	print_partition_extended(dev_desc, 0, 0, 1, 0);
 }
 
-int get_partition_info_dos(struct blk_desc *dev_desc, int part,
-			   disk_partition_t *info)
+int part_get_info_dos(struct blk_desc *dev_desc, int part,
+		      disk_partition_t *info)
 {
-	return get_partition_info_extended(dev_desc, 0, 0, 1, part, info, 0);
+	return part_get_info_extended(dev_desc, 0, 0, 1, part, info, 0);
 }
 
 U_BOOT_PART_TYPE(dos) = {
 	.name		= "DOS",
 	.part_type	= PART_TYPE_DOS,
-	.get_info	= part_get_info_ptr(get_partition_info_dos),
+	.get_info	= part_get_info_ptr(part_get_info_dos),
 	.print		= part_print_ptr(print_part_dos),
 	.test		= test_part_dos,
 };
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 3471b75..209a671 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -237,8 +237,8 @@
 	return;
 }
 
-int get_partition_info_efi(struct blk_desc *dev_desc, int part,
-			   disk_partition_t *info)
+int part_get_info_efi(struct blk_desc *dev_desc, int part,
+		      disk_partition_t *info)
 {
 	ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz);
 	gpt_entry *gpt_pte = NULL;
@@ -300,13 +300,13 @@
 	return 0;
 }
 
-int get_partition_info_efi_by_name(struct blk_desc *dev_desc,
+int part_get_info_efi_by_name(struct blk_desc *dev_desc,
 	const char *name, disk_partition_t *info)
 {
 	int ret;
 	int i;
 	for (i = 1; i < GPT_ENTRY_NUMBERS; i++) {
-		ret = get_partition_info_efi(dev_desc, i, info);
+		ret = part_get_info_efi(dev_desc, i, info);
 		if (ret != 0) {
 			/* no more entries in table */
 			return -1;
@@ -962,7 +962,7 @@
 U_BOOT_PART_TYPE(a_efi) = {
 	.name		= "EFI",
 	.part_type	= PART_TYPE_EFI,
-	.get_info	= part_get_info_ptr(get_partition_info_efi),
+	.get_info	= part_get_info_ptr(part_get_info_efi),
 	.print		= part_print_ptr(print_part_efi),
 	.test		= test_part_efi,
 };
diff --git a/disk/part_iso.c b/disk/part_iso.c
index 1d72d23..a1cf358 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -46,8 +46,8 @@
 
 
 /* only boot records will be listed as valid partitions */
-int get_partition_info_iso_verb(struct blk_desc *dev_desc, int part_num,
-				disk_partition_t *info, int verb)
+int part_get_info_iso_verb(struct blk_desc *dev_desc, int part_num,
+			   disk_partition_t *info, int verb)
 {
 	int i,offset,entry_num;
 	unsigned short *chksumbuf;
@@ -217,17 +217,18 @@
 	return 0;
 }
 
-static int get_partition_info_iso(struct blk_desc *dev_desc, int part_num,
+static int part_get_info_iso(struct blk_desc *dev_desc, int part_num,
 				  disk_partition_t *info)
 {
-	return(get_partition_info_iso_verb(dev_desc, part_num, info, 1));
+	return part_get_info_iso_verb(dev_desc, part_num, info, 1);
 }
 
 static void print_part_iso(struct blk_desc *dev_desc)
 {
 	disk_partition_t info;
 	int i;
-	if(get_partition_info_iso_verb(dev_desc,0,&info,0)==-1) {
+
+	if (part_get_info_iso_verb(dev_desc, 0, &info, 0) == -1) {
 		printf("** No boot partition found on device %d **\n",dev_desc->dev);
 		return;
 	}
@@ -237,20 +238,20 @@
 		printf(" %2d " LBAFU " " LBAFU " %6ld %.32s\n",
 		       i, info.start, info.size, info.blksz, info.type);
 		i++;
-	} while (get_partition_info_iso_verb(dev_desc,i,&info,0)!=-1);
+	} while (part_get_info_iso_verb(dev_desc, i, &info, 0) != -1);
 }
 
 static int test_part_iso(struct blk_desc *dev_desc)
 {
 	disk_partition_t info;
 
-	return(get_partition_info_iso_verb(dev_desc,0,&info,0));
+	return part_get_info_iso_verb(dev_desc, 0, &info, 0);
 }
 
 U_BOOT_PART_TYPE(iso) = {
 	.name		= "ISO",
 	.part_type	= PART_TYPE_ISO,
-	.get_info	= get_partition_info_iso,
+	.get_info	= part_get_info_iso,
 	.print		= print_part_iso,
 	.test		= test_part_iso,
 };
diff --git a/disk/part_mac.c b/disk/part_mac.c
index 3fb3b16..6192723 100644
--- a/disk/part_mac.c
+++ b/disk/part_mac.c
@@ -213,7 +213,7 @@
 	/* NOTREACHED */
 }
 
-static int get_partition_info_mac(struct blk_desc *dev_desc, int part,
+static int part_get_info_mac(struct blk_desc *dev_desc, int part,
 				  disk_partition_t *info)
 {
 	ALLOC_CACHE_ALIGN_BUFFER(mac_driver_desc_t, ddesc, 1);
@@ -240,7 +240,7 @@
 U_BOOT_PART_TYPE(mac) = {
 	.name		= "MAC",
 	.part_type	= PART_TYPE_MAC,
-	.get_info	= get_partition_info_mac,
+	.get_info	= part_get_info_mac,
 	.print		= print_part_mac,
 	.test		= test_part_mac,
 };
