Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1466825 > unrolled thread

[PATCH] hw_random: omap3-rom-rng.c: Remove obsoleted functions

Started byPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
First post2016-08-20 18:10 +0200
Last post2016-08-24 15:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] hw_random: omap3-rom-rng.c: Remove obsoleted functions PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> - 2016-08-20 18:10 +0200
    Re: [PATCH] hw_random: omap3-rom-rng.c: Remove obsoleted functions Herbert Xu <herbert@gondor.apana.org.au> - 2016-08-24 15:20 +0200

#1466825 — [PATCH] hw_random: omap3-rom-rng.c: Remove obsoleted functions

FromPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Date2016-08-20 18:10 +0200
Subject[PATCH] hw_random: omap3-rom-rng.c: Remove obsoleted functions
Message-ID<s8h0l-5cN-7@gated-at.bofh.it>
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.

Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
---
 drivers/char/hw_random/omap3-rom-rng.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c
index 8da14f1..37a58d7 100644
--- a/drivers/char/hw_random/omap3-rom-rng.c
+++ b/drivers/char/hw_random/omap3-rom-rng.c
@@ -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)
-- 
2.5.0

[toc] | [next] | [standalone]


#1469413

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2016-08-24 15:20 +0200
Message-ID<s9Gg1-2I8-11@gated-at.bofh.it>
In reply to#1466825
On Sat, Aug 20, 2016 at 09:31:06PM +0530, PrasannaKumar Muralidharan wrote:
> 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.
> 
> Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web