Explorar o código

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
Linus Torvalds %!s(int64=13) %!d(string=hai) anos
pai
achega
48d4e137ea
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/char/hw_random/atmel-rng.c

+ 1 - 1
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;
 	u32 *data = buf;
 
 
 	/* data ready? */
 	/* data ready? */
-	if (readl(trng->base + TRNG_ODATA) & 1) {
+	if (readl(trng->base + TRNG_ISR) & 1) {
 		*data = readl(trng->base + TRNG_ODATA);
 		*data = readl(trng->base + TRNG_ODATA);
 		/*
 		/*
 		  ensure data ready is only set again AFTER the next data
 		  ensure data ready is only set again AFTER the next data