summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-18 21:20:36 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-18 21:20:36 +0200
commit48d4e137ea3174dc77efe1cc20570e95af2ffc9e (patch)
treee363b7141778c95bb4595477c869870954486007 /drivers
parentMerge tag 'mmc-fixes-for-3.5-rc4' of git://git.kernel.org/pub/scm/linux/kerne... (diff)
parenthwrng: atmel-rng - fix data valid check (diff)
downloadlinux-48d4e137ea3174dc77efe1cc20570e95af2ffc9e.tar.xz
linux-48d4e137ea3174dc77efe1cc20570e95af2ffc9e.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull a crypto fix from Herbert Xu: "This push fixes another bug in the atmel-rng that made it produce completely useless output." * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: hwrng: atmel-rng - fix data valid check
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/hw_random/atmel-rng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c
index 6289f0eee24c..731c9046cf7b 100644
--- a/drivers/char/hw_random/atmel-rng.c
+++ b/drivers/char/hw_random/atmel-rng.c
@@ -34,7 +34,7 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
u32 *data = buf;
/* data ready? */
- if (readl(trng->base + TRNG_ODATA) & 1) {
+ if (readl(trng->base + TRNG_ISR) & 1) {
*data = readl(trng->base + TRNG_ODATA);
/*
ensure data ready is only set again AFTER the next data