hwrng: mxc-rnga - Drop usage of platform_driver_probe()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 24 Mar 2024 16:12:26 +0000 (17:12 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 2 Apr 2024 02:49:39 +0000 (10:49 +0800)
commita9a72140536fe02d98bce72a608ccf3ba9008a71
tree7b61a63566a3cb279d86232a2a898e9d5a073ea8
parente3299a4c1c4265535625df4d947ffd119f146bfc
hwrng: mxc-rnga - Drop usage of platform_driver_probe()

There are considerations to drop platform_driver_probe() as a concept
that isn't relevant any more today. It comes with an added complexity
that makes many users hold it wrong. (E.g. this driver should have mark
the driver struct with __refdata.)

Convert the driver to the more usual module_platform_driver().

This fixes a W=1 build warning:

WARNING: modpost: drivers/char/hw_random/mxc-rnga: section mismatch in reference: mxc_rnga_driver+0x10 (section: .data) -> mxc_rnga_remove (section: .exit.text)

with CONFIG_HW_RANDOM_MXC_RNGA=m.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/mxc-rnga.c