FAT: implement fat_set_blk_dev(), convert cmd_fat.c

This makes the FAT filesystem API more consistent with other block-based
filesystems. If in the future standard multi-filesystem commands such as
"ls" or "load" are implemented, having FAT work the same way as other
filesystems will be necessary.

Convert cmd_fat.c to the new API, so the code looks more like other files
implementing the same commands for other filesystems.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
diff --git a/common/cmd_fat.c b/common/cmd_fat.c
index 5a5698b..c38302d 100644
--- a/common/cmd_fat.c
+++ b/common/cmd_fat.c
@@ -55,7 +55,7 @@
 		return 1;
 
 	dev = dev_desc->dev;
-	if (fat_register_device(dev_desc,part)!=0) {
+	if (fat_set_blk_dev(dev_desc, &info) != 0) {
 		printf("\n** Unable to use %s %d:%d for fatload **\n",
 			argv[1], dev, part);
 		return 1;
@@ -111,7 +111,7 @@
 		return 1;
 
 	dev = dev_desc->dev;
-	if (fat_register_device(dev_desc,part)!=0) {
+	if (fat_set_blk_dev(dev_desc, &info) != 0) {
 		printf("\n** Unable to use %s %d:%d for fatls **\n",
 			argv[1], dev, part);
 		return 1;
@@ -149,7 +149,7 @@
 		return 1;
 
 	dev = dev_desc->dev;
-	if (fat_register_device(dev_desc,part)!=0) {
+	if (fat_set_blk_dev(dev_desc, &info) != 0) {
 		printf("\n** Unable to use %s %d:%d for fatinfo **\n",
 			argv[1], dev, part);
 		return 1;
@@ -185,7 +185,7 @@
 
 	dev = dev_desc->dev;
 
-	if (fat_register_device(dev_desc, part) != 0) {
+	if (fat_set_blk_dev(dev_desc, &info) != 0) {
 		printf("\n** Unable to use %s %d:%d for fatwrite **\n",
 			argv[1], dev, part);
 		return 1;