summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNicolas Frattaroli <nicolas.frattaroli@collabora.com>2025-02-04 18:35:48 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2025-02-22 10:56:02 +0300
commit8bb8609293ff3d8998d75c8db605c0529e83bcd9 (patch)
treee8203da0ec3f2cccd749e46937dc2c3fac10934f /include/linux
parente00fc3d6e7c2d0b2ab5cf03a576df39cd94479aa (diff)
downloadlinux-8bb8609293ff3d8998d75c8db605c0529e83bcd9.tar.xz
hwrng: rockchip - store dev pointer in driver struct
The rockchip rng driver does a dance to store the dev pointer in the hwrng's unsigned long "priv" member. However, since the struct hwrng member of rk_rng is not a pointer, we can use container_of to get the struct rk_rng instance from just the struct hwrng*, which means we don't have to subvert what little there is in C of a type system and can instead store a pointer to the device struct in the rk_rng itself. Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions