lkml.org 
[lkml]   [2000]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectGET_USE_COUNT(THIS_MODULE) and i810_rng driver.
Hi Keith,

I tried to compile Jeff's i810_rng driver statically and I can't because
of a construct like this:

if (GET_USE_COUNT(THIS_MODULE) > 0)
MOD_DEC_USE_COUNT;
if (GET_USE_COUNT(THIS_MODULE) == 0)
rng_hw_enabled = 0;

A similar thing is used by other drivers but always inside #ifdef
MODULE. The problem here is that if MODULE is not defined then THIS_MODULE
is just NULL and GET_USE_COUNT(NULL) is not a very wise thing to be used
in expressions :)

Any ideas what should one do? To enclose the driver's code inside #ifdef
MODULE (and check all other drivers) or to provide a magic version of
GET_USE_COUNT() that will be suitable for static case? E.g. 1? Is 1 good
enough?

Regards,
Tigran

-
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/

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.058 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site