lkml.org 
[lkml]   [2006]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC 4/7][PATCH] AMBA DMA: Add a driver module for the DMA controller.
From
Date
On Mon, 2006-10-30 at 12:02 +0000, Peter Pearse wrote:
> }
> +/*
> + * Export wrapped find_module to allow drivers to find their modules
> + * Useful for e.g. controlling the usage count
> + */
> +struct module *try_find_module(const char *name)
> +{
> + struct module *mod;
> + mutex_lock(&module_mutex);
> + mod = find_module(name);
> + mutex_unlock(&module_mutex);
> + return mod;
> +}
> +EXPORT_SYMBOL(try_find_module);
> +

this looks very very wrong to me.
It's racey for one, and for another, module names sound wrong. You want
to be using the symbol it provides instead, and then use __symbol_get()
and friends...

--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-30 13:17    [W:0.037 / U:1.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site