On Tue, 3 Oct 2000, Rasmus Andersen wrote:
> On Tue, Oct 03, 2000 at 08:20:12PM +0000, Graham Murray wrote:
> > i810_rng.c does not compile when not a module. It fails at line 384,
> > which looks as though it should only be included when being built as a
> > module.
>
> This patch fixes this. Could the maintainer comment? Is there a better
> way to do this?
>
>
> --- linux-240-test9-clean/drivers/char/i810_rng.c Tue Oct 3 22:12:37 2000
> +++ linux/drivers/char/i810_rng.c Tue Oct 3 22:36:01 2000
> @@ -380,7 +380,7 @@
> rng_hw_enabled = 1;
> MOD_INC_USE_COUNT;
> } else {
> -#ifndef __alpha__
> +#if !defined(__alpha__) && defined (CONFIG_MODULE)
> if (GET_USE_COUNT (THIS_MODULE) > 0)
> MOD_DEC_USE_COUNT;
> if (GET_USE_COUNT (THIS_MODULE) == 0)
>
This patch looks ok to me.
That entire #if is a hack. GET_USE_COUNT kills the Alpha build.
Further, all module-related stuff should ideally work when built into
the kernel, without ifdefs.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:12 EST