mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] CFI flash driver: Fix misleading trace when unprotecting a sector
@ 2010-01-04 19:42 Matthias Kaehlcke
  0 siblings, 0 replies; only message in thread
From: Matthias Kaehlcke @ 2010-01-04 19:42 UTC (permalink / raw)
  To: barebox

When (un)protecting a flash sector with the CFI flash driver a trace
"protect 0x..." is generated, independently of the type of operation. This is
misleading in case of an unprotect. Tell the truth when unprotecting a sector.

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
 drivers/nor/cfi_flash.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/nor/cfi_flash.c b/drivers/nor/cfi_flash.c
index 37206d0..938e2cb 100644
--- a/drivers/nor/cfi_flash.c
+++ b/drivers/nor/cfi_flash.c
@@ -380,7 +380,8 @@ static int cfi_protect(struct cdev *cdev, size_t count, unsigned long offset, in
 	unsigned long start, end;
 	int i, ret = 0;
 
-	debug("%s: protect 0x%08x (size %d)\n", __FUNCTION__, offset, count);
+	debug("%s: %sprotect 0x%08x (size %d)\n",
+		__FUNCTION__, (prot? "" : "un"), offset, count);
 
 	start = flash_find_sector(finfo, cdev->dev->map_base + offset);
 	end   = flash_find_sector(finfo, cdev->dev->map_base + offset + count - 1);
-- 
1.6.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-04 20:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-04 19:42 [PATCH 1/2] CFI flash driver: Fix misleading trace when unprotecting a sector Matthias Kaehlcke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox