]> git.baikalelectronics.ru Git - kernel.git/commit
hwrng: omap - Remove global definition of hwrng
authorRomain Perier <romain.perier@free-electrons.com>
Fri, 16 Sep 2016 10:08:52 +0000 (12:08 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Oct 2016 02:27:51 +0000 (10:27 +0800)
commit810fc054168d2299b5a5562e44e679bdb5868fd6
treed7db79d480717fd689c4ec9d9caa1d3dd23519f7
parent6e21dd86b6c3f11683e5e3886569f3fb7d7b7010
hwrng: omap - Remove global definition of hwrng

The omap-rng driver currently assumes that there will only ever be a
single instance of an RNG device. For this reason, there is a statically
allocated struct hwrng, with a fixed name. However, registering two
struct hwrng with the same isn't accepted by the RNG framework, so we
need to switch to a dynamically allocated struct hwrng, each using a
different name. Then, we define the name of this hwrng to "dev_name(dev)",
so the name of the data structure is unique per device.

Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/omap-rng.c