Skip to content

Commit

Permalink
hwrng: OMAP: remove SoC restrictions from driver registration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Walmsley committed Sep 23, 2012
1 parent 4848d46 commit fe47c58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mach-omap1/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
3 changes: 0 additions & 3 deletions drivers/char/hw_random/omap-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit fe47c58

Please sign in to comment.