]> git.karo-electronics.de Git - linux-beck.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)
commitb23d2d92ce34a487436dba8549a302729c5a40a2
treed7db79d480717fd689c4ec9d9caa1d3dd23519f7
parent69eb4d0190eab9e32fccbe1ec64dec1cfa7fb01a
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