From: 黄涛 <huangtao@rock-chips.com>
Date: Mon, 19 Mar 2012 06:27:13 +0000 (+0800)
Subject: USB: gadget: storage: port to rk platform
X-Git-Tag: firefly_0821_release~9595^2~48
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3335fb6f5952f53e4b49f5b18a34dc8310b097cd;p=firefly-linux-kernel-4.4.55.git

USB: gadget: storage: port to rk platform
---

diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 4d477b2b84d5..f75613a35836 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -298,7 +298,7 @@
 #include "gadget_chips.h"
 
 
-#ifdef CONFIG_ARCH_RK29
+#ifdef CONFIG_PLAT_RK
 /* flush after every 4 meg of writes to avoid excessive block level caching */
 #define MAX_UNFLUSHED_BYTES  (64 * 1024)// (4 * 1024 * 1024) //original value is 4MB,Modifyed by xbw at 2011-08-18
 #define MAX_UNFLUSHED_PACKETS 4//16
@@ -1989,7 +1989,7 @@ static int check_command(struct fsg_common *common, int cmnd_size,
 	return 0;
 }
 
-#ifdef CONFIG_ARCH_RK29
+#ifdef CONFIG_PLAT_RK
 static void deferred_restart(struct work_struct *dummy)
 {
 	sys_sync();
@@ -2143,7 +2143,7 @@ static int do_scsi_command(struct fsg_common *common)
 	int			reply = -EINVAL;
 	int			i;
 	static char		unknown[16];
-#ifdef CONFIG_ARCH_RK29
+#ifdef CONFIG_PLAT_RK
 	struct fsg_common	*fsg = common;
 #endif
 
@@ -2336,7 +2336,7 @@ static int do_scsi_command(struct fsg_common *common)
 				      (1<<1) | (0xf<<2) | (3<<7), 1,
 				      "VERIFY");
 		if (reply == 0)
-#ifdef CONFIG_ARCH_RK29
+#ifdef CONFIG_PLAT_RK
 			reply = 0; //zyf 20100302
 #else
 			reply = do_verify(common);
@@ -2396,7 +2396,7 @@ unknown_cmnd:
 			reply = -EINVAL;
 		}
 		break;
-#ifdef CONFIG_ARCH_RK29
+#ifdef CONFIG_PLAT_RK
 	case 0xff:
 		if( fsg->cmnd[1] != 0xe0 ||
 		    fsg->cmnd[2] != 0xff || fsg->cmnd[3] != 0xff ||
@@ -3405,7 +3405,7 @@ fsg_common_from_params(struct fsg_common *common,
 
 #ifdef CONFIG_USB_ANDROID_MASS_STORAGE
 
-#ifdef CONFIG_ARCH_RK29
+#ifdef CONFIG_PLAT_RK
 static enum power_supply_property usb_props[] = {
 //	POWER_SUPPLY_PROP_STATUS,
 	POWER_SUPPLY_PROP_ONLINE,
@@ -3483,7 +3483,7 @@ static int fsg_probe(struct platform_device *pdev)
 	fsg_cfg.can_stall = 0;
 	fsg_cfg.pdev = pdev;
 
-#ifdef CONFIG_ARCH_RK29
+#ifdef CONFIG_PLAT_RK
 {
 	/*
 	 * Initialize usb power supply
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index 618b3f076c1f..b4b023b24677 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -767,7 +767,7 @@ static ssize_t fsg_store_file(struct device *dev, struct device_attribute *attr,
 	struct rw_semaphore	*filesem = dev_get_drvdata(dev);
 	int		rc = 0;
 
-#ifdef CONFIG_ARCH_RK29
+#ifdef CONFIG_PLAT_RK
 	printk("store_file: \"%s\"\n", buf);
 #endif