All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <paul@pwsan.com>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Matt Mackall <mpm@selenic.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] hwrng: OMAP: remove SoC restrictions from driver registration
Date: Mon, 27 Aug 2012 17:36:12 -0600	[thread overview]
Message-ID: <20120827233611.15045.19688.stgit@dusk.lan> (raw)
In-Reply-To: <20120827232922.15045.56522.stgit@dusk.lan>

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>
---
 arch/arm/mach-omap1/devices.c     |    3 +++
 drivers/char/hw_random/omap-rng.c |    3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 7f3d9d2..aedd7a4 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -377,6 +377,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);
 }
 
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 748fcc8..a5effd8 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -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);
 }
 



WARNING: multiple messages have this Message-ID (diff)
From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] hwrng: OMAP: remove SoC restrictions from driver registration
Date: Mon, 27 Aug 2012 17:36:12 -0600	[thread overview]
Message-ID: <20120827233611.15045.19688.stgit@dusk.lan> (raw)
In-Reply-To: <20120827232922.15045.56522.stgit@dusk.lan>

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>
---
 arch/arm/mach-omap1/devices.c     |    3 +++
 drivers/char/hw_random/omap-rng.c |    3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 7f3d9d2..aedd7a4 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -377,6 +377,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);
 }
 
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 748fcc8..a5effd8 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -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);
 }
 

WARNING: multiple messages have this Message-ID (diff)
From: Paul Walmsley <paul@pwsan.com>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Herbert Xu <herbert@gondor.hengli.com.au>,
	Matt Mackall <mpm@selenic.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] hwrng: OMAP: remove SoC restrictions from driver registration
Date: Mon, 27 Aug 2012 17:36:12 -0600	[thread overview]
Message-ID: <20120827233611.15045.19688.stgit@dusk.lan> (raw)
In-Reply-To: <20120827232922.15045.56522.stgit@dusk.lan>

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>
---
 arch/arm/mach-omap1/devices.c     |    3 +++
 drivers/char/hw_random/omap-rng.c |    3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 7f3d9d2..aedd7a4 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -377,6 +377,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);
 }
 
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 748fcc8..a5effd8 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -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);
 }
 



  parent reply	other threads:[~2012-08-27 23:38 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27 23:36 [PATCH 0/5] hwrng/ARM: OMAP: convert to use runtime PM Paul Walmsley
2012-08-27 23:36 ` Paul Walmsley
2012-08-27 23:36 ` [PATCH 1/5] ARM: OMAP2/3: hwmod: add RNG integration data Paul Walmsley
2012-08-27 23:36   ` Paul Walmsley
2012-09-19  1:13   ` Paul Walmsley
2012-09-19  1:13     ` Paul Walmsley
2012-09-19  3:52     ` Paul Walmsley
2012-09-19  3:52       ` Paul Walmsley
2012-08-27 23:36 ` [PATCH 2/5] hwrng: OMAP: store per-device data in per-device variables, not file statics Paul Walmsley
2012-08-27 23:36   ` Paul Walmsley
2012-08-27 23:36   ` Paul Walmsley
2012-08-27 23:36 ` [PATCH 3/5] hwrng: OMAP: convert to use runtime PM Paul Walmsley
2012-08-27 23:36   ` Paul Walmsley
2012-08-27 23:36   ` Paul Walmsley
2012-08-27 23:36 ` [PATCH 4/5] ARM: OMAP: split OMAP1, OMAP2+ RNG device registration Paul Walmsley
2012-08-27 23:36   ` Paul Walmsley
2012-08-27 23:36 ` Paul Walmsley [this message]
2012-08-27 23:36   ` [PATCH 5/5] hwrng: OMAP: remove SoC restrictions from driver registration Paul Walmsley
2012-08-27 23:36   ` Paul Walmsley
2012-08-30 20:27 ` [PATCH 0/5] hwrng/ARM: OMAP: convert to use runtime PM Tony Lindgren
2012-08-30 20:27   ` Tony Lindgren
2012-08-30 20:29   ` Herbert Xu
2012-08-30 20:29     ` Herbert Xu
2012-08-30 20:57     ` Paul Walmsley
2012-08-30 20:57       ` Paul Walmsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120827233611.15045.19688.stgit@dusk.lan \
    --to=paul@pwsan.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mpm@selenic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.