hwrng: OMAP: remove SoC restrictions from driver registration
authorPaul Walmsley <paul@pwsan.com>
Sun, 23 Sep 2012 23:28:27 +0000 (17:28 -0600)
committerPaul Walmsley <paul@pwsan.com>
Sun, 23 Sep 2012 23:28:27 +0000 (17:28 -0600)
Remove the SoC restriction code from the OMAP RNG driver.  The
integration code in arch/arm/*omap* should handle this.  The device
shouldn't be created if it doesn't exist on the currently-booted SoC.

This allows us to remove some OMAP-specific cpu_is_omap*() calls from
the driver.  Also, if other OMAP chips have RNGs that can be used
by Linux, there will be no need to modify the driver.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm/mach-omap1/devices.c
drivers/char/hw_random/omap-rng.c

index 23a0b116b078c3ed1898fac3c22538c204df4599..7a5a3285e9652cac7f225816e7028a0f64bafc39 100644 (file)
@@ -376,6 +376,9 @@ static struct platform_device omap1_rng_device = {
 
 static void omap1_init_rng(void)
 {
+       if (!cpu_is_omap16xx())
+               return;
+
        (void) platform_device_register(&omap1_rng_device);
 }
 
index 748fcc8892f35cae1e4f3b491971cb7f7908d3a2..a5effd813abddbcdb6a0603148caa822b7dd36f6 100644 (file)
@@ -220,9 +220,6 @@ static struct platform_driver omap_rng_driver = {
 
 static int __init omap_rng_init(void)
 {
-       if (!cpu_is_omap16xx() && !cpu_is_omap24xx())
-               return -ENODEV;
-
        return platform_driver_register(&omap_rng_driver);
 }
 
This page took 0.035354 seconds and 5 git commands to generate.