Skip to content

Commit

Permalink
char: nwflash: remove old led event code
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
  • Loading branch information
Bryan Wu committed Aug 1, 2012
1 parent cf6856d commit 51891a4
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions drivers/char/nwflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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

/*
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
*/
Expand Down Expand Up @@ -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));

/*
Expand Down Expand Up @@ -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 {
Expand All @@ -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));
Expand Down

0 comments on commit 51891a4

Please sign in to comment.