public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP: Fix RNG driver build
@ 2006-07-22 12:01 Komal Shah
  2006-07-22 16:54 ` Michael Buesch
  0 siblings, 1 reply; 3+ messages in thread
From: Komal Shah @ 2006-07-22 12:01 UTC (permalink / raw)
  To: juha.yrjola, tony, dsaxena, mb; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]

Michael/Deepak/Juha,

Attached patch fixes the following RNG driver build warnings and errors:

drivers/char/hw_random/omap-rng.c:33:32: asm/hardware/clock.h: No such file or directory
drivers/char/hw_random/omap-rng.c: In function `omap_rng_probe':
drivers/char/hw_random/omap-rng.c:88: warning: implicit declaration of function `to_platform_device'
drivers/char/hw_random/omap-rng.c:88: warning: initialization makes pointer from integer without a cast
drivers/char/hw_random/omap-rng.c:99: warning: implicit declaration of function `clk_get'
drivers/char/hw_random/omap-rng.c:99: warning: assignment makes pointer from integer without a cast
drivers/char/hw_random/omap-rng.c:106: warning: implicit declaration of function `clk_use'
drivers/char/hw_random/omap-rng.c:110: warning: implicit declaration of function `platform_get_resource'
drivers/char/hw_random/omap-rng.c:110: warning: assignment makes pointer from integer without a cast
drivers/char/hw_random/omap-rng.c:115: error: dereferencing pointer to incomplete type
drivers/char/hw_random/omap-rng.c: In function `omap_rng_remove':
drivers/char/hw_random/omap-rng.c:148: warning: implicit declaration of function `clk_unuse'
drivers/char/hw_random/omap-rng.c:149: warning: implicit declaration of function `clk_put'
drivers/char/hw_random/omap-rng.c: At top level:
drivers/char/hw_random/omap-rng.c:184: error: `platform_bus_type' undeclared here (not in a function)
drivers/char/hw_random/omap-rng.c:184: error: initializer element is not constant
drivers/char/hw_random/omap-rng.c:184: error: (near initialization for `omap_rng_driver.bus')

Please give your Signed-off-by: line if it is OK.

---Komal Shah
http://komalshah.blogspot.com

-- 
http://www.fastmail.fm - Faster than the air-speed velocity of an
                          unladen european swallow


[-- Attachment #2: 0001-OMAP-Fix-RNG-build.patch --]
[-- Type: application/octet-stream, Size: 2918 bytes --]

From nobody Mon Sep 17 00:00:00 2001
From: Komal Shah <komal_shah802003@yahoo.com>
Date: Sat, 22 Jul 2006 22:54:30 +0530
Subject: [PATCH] OMAP: Fix RNG driver build.

Fixes following warnings and errors:

drivers/char/hw_random/omap-rng.c:33:32: asm/hardware/clock.h: No such file or
directory
drivers/char/hw_random/omap-rng.c: In function `omap_rng_probe':
drivers/char/hw_random/omap-rng.c:88: warning: implicit declaration of function
`to_platform_device'
drivers/char/hw_random/omap-rng.c:88: warning: initialization makes pointer from
integer without a cast
drivers/char/hw_random/omap-rng.c:99: warning: implicit declaration of function
`clk_get'
drivers/char/hw_random/omap-rng.c:99: warning: assignment makes pointer from
integer without a cast
drivers/char/hw_random/omap-rng.c:106: warning: implicit declaration of function
`clk_use'
drivers/char/hw_random/omap-rng.c:110: warning: implicit declaration of function
`platform_get_resource'
drivers/char/hw_random/omap-rng.c:110: warning: assignment makes pointer from
integer without a cast
drivers/char/hw_random/omap-rng.c:115: error: dereferencing pointer to
incomplete type
drivers/char/hw_random/omap-rng.c: In function `omap_rng_remove':
drivers/char/hw_random/omap-rng.c:148: warning: implicit declaration of function
`clk_unuse'
drivers/char/hw_random/omap-rng.c:149: warning: implicit declaration of function
`clk_put'
drivers/char/hw_random/omap-rng.c: At top level:
drivers/char/hw_random/omap-rng.c:184: error: `platform_bus_type' undeclared
here (not in a function)
drivers/char/hw_random/omap-rng.c:184: error: initializer element is not
constant
drivers/char/hw_random/omap-rng.c:184: error: (near initialization for
					       `omap_rng_driver.bus')

Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>

---

 drivers/char/hw_random/omap-rng.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

01bc1652e682298967efd258292aa77d2b95a2a6
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 819516b..6811da6 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -28,9 +28,10 @@ #include <linux/random.h>
 #include <linux/err.h>
 #include <linux/device.h>
 #include <linux/hw_random.h>
+#include <linux/platform_device.h>
+#include <linux/clk.h>
 
 #include <asm/io.h>
-#include <asm/hardware/clock.h>
 
 #define RNG_OUT_REG		0x00		/* Output register */
 #define RNG_STAT_REG		0x04		/* Status register
@@ -102,9 +103,7 @@ static int __init omap_rng_probe(struct 
 			ret = PTR_ERR(rng_ick);
 			return ret;
 		}
-		else {
-			clk_use(rng_ick);
-		}
+		clk_enable(rng_ick);
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -145,7 +144,7 @@ static int __exit omap_rng_remove(struct
 	omap_rng_write_reg(RNG_MASK_REG, 0x0);
 
 	if (cpu_is_omap24xx()) {
-		clk_unuse(rng_ick);
+		clk_disable(rng_ick);
 		clk_put(rng_ick);
 	}
 
-- 
1.3.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] OMAP: Fix RNG driver build
  2006-07-22 12:01 [PATCH] OMAP: Fix RNG driver build Komal Shah
@ 2006-07-22 16:54 ` Michael Buesch
  2006-08-07 12:07   ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Buesch @ 2006-07-22 16:54 UTC (permalink / raw)
  To: Komal Shah, dsaxena; +Cc: tony, juha.yrjola, linux-kernel

On Saturday 22 July 2006 14:01, Komal Shah wrote:
> Michael/Deepak/Juha,
> 
> Attached patch fixes the following RNG driver build warnings and errors:

I don't have the hardware, so I can't test this.
Deepak, do you have the hardware and can you ack this?

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] OMAP: Fix RNG driver build
  2006-07-22 16:54 ` Michael Buesch
@ 2006-08-07 12:07   ` Tony Lindgren
  0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2006-08-07 12:07 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Komal Shah, dsaxena, juha.yrjola, linux-kernel

* Michael Buesch <mb@bu3sch.de> [060722 19:56]:
> On Saturday 22 July 2006 14:01, Komal Shah wrote:
> > Michael/Deepak/Juha,
> > 
> > Attached patch fixes the following RNG driver build warnings and errors:
> 
> I don't have the hardware, so I can't test this.
> Deepak, do you have the hardware and can you ack this?

This is safe to push and has been used in the linux-omap tree.

Signed-off-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-07 12:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-22 12:01 [PATCH] OMAP: Fix RNG driver build Komal Shah
2006-07-22 16:54 ` Michael Buesch
2006-08-07 12:07   ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox