USB: gadget: storage: port to rk platform
author黄涛 <huangtao@rock-chips.com>
Mon, 19 Mar 2012 06:27:13 +0000 (14:27 +0800)
committer黄涛 <huangtao@rock-chips.com>
Mon, 19 Mar 2012 06:27:13 +0000 (14:27 +0800)
drivers/usb/gadget/f_mass_storage.c
drivers/usb/gadget/storage_common.c

index 4d477b2b84d56ab6377f745091441c5976f804fd..f75613a3583665d43a83ed2f9100327e37634c62 100644 (file)
 #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
index 618b3f076c1f394c75f5214d93afcfa6e12e2474..b4b023b246776ae5907cf4b7b53fd5c312b29e7f 100644 (file)
@@ -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