summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-12-19 16:06:13 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2010-12-20 09:28:21 +0100
commitf4b1ebd2fdbfb2fd2382de894e027d014d1505d8 (patch)
tree57f21999d946787b5d68cacff021aa3e528a02c8
parentfad11e85641d27f683e2866ec5700cafd5868179 (diff)
downloadbarebox-f4b1ebd2fdbfb2fd2382de894e027d014d1505d8.tar.gz
cfi flash driver: check for ctrl-c during erase
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/nor/cfi_flash.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/nor/cfi_flash.c b/drivers/nor/cfi_flash.c
index 2fa2c6b..d190e35 100644
--- a/drivers/nor/cfi_flash.c
+++ b/drivers/nor/cfi_flash.c
@@ -498,6 +498,11 @@ static int __cfi_erase(struct cdev *cdev, size_t count, unsigned long offset,
if (ret)
goto out;
+ if (ctrlc()) {
+ ret = -EINTR;
+ goto out;
+ }
+
if (verbose)
show_progress(i - start);
}