hwrng: omap3-rom - Remove obsoleted functions
authorPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Sat, 20 Aug 2016 16:01:06 +0000 (21:31 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 24 Aug 2016 13:04:50 +0000 (21:04 +0800)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/omap3-rom-rng.c

index 8da14f1a1f569291a8c61107e085ecef331ce232..37a58d78aab317a8a97b39ebec02df1fb58fcaae 100644 (file)
@@ -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)