Skip to contentSkip to conversation

hw_random: omap3-rom-rng.c: Remove obsoleted functions

PATCH In review PrasannaKumar Muralidharan 2 participants 2 messages Aug 20, 2016 – Aug 24, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw_random: omap3-rom-rng.c: Remove obsoleted functions

Remove omap3_rom_rng_data_present method as it was returning 1 always. Use .read callback instead of .data_read callback. This avoids use of obsolete callbacks.

This patch is not tested with hardware as I don't have access to it.

---
 drivers/char/hw_random/omap3-rom-rng.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/char/hw_random/omap3-rom-rng.c +2 -8
index 8da14f1..37a58d7 100644
@@ -71,12 +71,7 @@ static int omap3_rom_rng_get_random(void *buf, unsigned int count)
 	return 0;
 }
 
-static int omap3_rom_rng_data_present(struct hwrng *rng, int wait)
-{
-	return 1;
-}
-
-static int omap3_rom_rng_data_read(struct hwrng *rng, u32 *data)
+static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
 {
 	int r;
 
@@ -88,8 +83,7 @@ static int omap3_rom_rng_data_read(struct hwrng *rng, u32 *data)
 
 static struct hwrng omap3_rom_rng_ops = {
 	.name		= "omap3-rom",
-	.data_present	= omap3_rom_rng_data_present,
-	.data_read	= omap3_rom_rng_data_read,
+	.read		= omap3_rom_rng_read,
 };
 
 static int omap3_rom_rng_probe(struct platform_device *pdev)
Signature · 1 line
2.5.0
maintainer
#1 lore raw
Quoted 7 lines · PrasannaKumar Muralidharan

Remove omap3_rom_rng_data_present method as it was returning 1 always. Use .read callback instead of .data_read callback. This avoids use of obsolete callbacks.

This patch is not tested with hardware as I don't have access to it.

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt