From: "Komal Shah" 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: Andrew Morton --- drivers/char/hw_random/omap-rng.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff -puN drivers/char/hw_random/omap-rng.c~omap-fix-rng-driver-build drivers/char/hw_random/omap-rng.c --- a/drivers/char/hw_random/omap-rng.c~omap-fix-rng-driver-build +++ a/drivers/char/hw_random/omap-rng.c @@ -28,9 +28,10 @@ #include #include #include +#include +#include #include -#include #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); } _