Use the new batched user accesses in generic user string handling
[firefly-linux-kernel-4.4.55.git] / drivers / char / nwflash.c
index 04e2a9491fca2c63d14d95006e7e52d9a9db1a32..e371480d36394974cc5e27787c6a243e2c075dcf 100644 (file)
@@ -30,7 +30,6 @@
 
 #include <asm/hardware/dec21285.h>
 #include <asm/io.h>
-#include <asm/leds.h>
 #include <asm/mach-types.h>
 #include <asm/uaccess.h>
 
@@ -179,9 +178,6 @@ static ssize_t flash_write(struct file *file, const char __user *buf,
 
        written = 0;
 
-       leds_event(led_claim);
-       leds_event(led_green_on);
-
        nBlock = (int) p >> 16; //block # of 64K bytes
 
        /*
@@ -258,11 +254,6 @@ static ssize_t flash_write(struct file *file, const char __user *buf,
                        printk(KERN_DEBUG "flash_write: written 0x%X bytes OK.\n", written);
        }
 
-       /*
-        * restore reg on exit
-        */
-       leds_event(led_release);
-
        mutex_unlock(&nwflash_mutex);
 
        return written;
@@ -333,11 +324,6 @@ static int erase_block(int nBlock)
        unsigned long timeout;
        int temp, temp1;
 
-       /*
-        * orange LED == erase
-        */
-       leds_event(led_amber_on);
-
        /*
         * reset footbridge to the correct offset 0 (...0..3)
         */
@@ -446,12 +432,6 @@ static int write_block(unsigned long p, const char __user *buf, int count)
        unsigned long timeout;
        unsigned long timeout1;
 
-       /*
-        * red LED == write
-        */
-       leds_event(led_amber_off);
-       leds_event(led_red_on);
-
        pWritePtr = (unsigned char *) ((unsigned int) (FLASH_BASE + p));
 
        /*
@@ -557,18 +537,10 @@ static int write_block(unsigned long p, const char __user *buf, int count)
                                        printk(KERN_DEBUG "write_block: Retrying write at 0x%X)n",
                                               pWritePtr - FLASH_BASE);
 
-                               /*
-                                * no LED == waiting
-                                */
-                               leds_event(led_amber_off);
                                /*
                                 * wait couple ms
                                 */
                                msleep(10);
-                               /*
-                                * red LED == write
-                                */
-                               leds_event(led_red_on);
 
                                goto WriteRetry;
                        } else {
@@ -583,12 +555,6 @@ static int write_block(unsigned long p, const char __user *buf, int count)
                }
        }
 
-       /*
-        * green LED == read/verify
-        */
-       leds_event(led_amber_off);
-       leds_event(led_green_on);
-
        msleep(10);
 
        pWritePtr = (unsigned char *) ((unsigned int) (FLASH_BASE + p));