lkml.org 
[lkml]   [2003]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SET_MODULE_OWNER?
On Tue, 8 Apr 2003, Rusty Russell wrote:

> I still don't understand: please demonstrate a use in existing source.
> Rusty.

I do agree it only does something which we do manually with a lot of the
other members, however i'm not quite sure wether the compatibility thing
still holds since a number of drivers have a lot of 2.5 specific stuff
(e.g. pci-dma api changes). Regardless, here is a typical use in a
netdriver.

/* dev and dev->priv zeroed in alloc_etherdev */
dev = alloc_etherdev (sizeof (*tp));
if (dev == NULL) {
printk (KERN_ERR PFX "%s: Unable to alloc new net device\n", pdev->slot_name);
return -ENOMEM;
}
SET_MODULE_OWNER(dev);
tp = dev->priv;
/* followed by ... */
dev->foo = __foo;
dev->bar = __bar;

Zwane

--
function.linuxpower.ca
-
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: 2005-03-22 13:34    [from the cache]
©2003-2011 Jasper Spaans