lkml.org 
[lkml]   [2003]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: SET_MODULE_OWNER?
    Date
    In message <Pine.LNX.4.50.0304072212310.21025-100000@montezuma.mastecende.com> 
    you write:
    > (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", pd
    ev->slot_name);
    > return -ENOMEM;
    > }
    > SET_MODULE_OWNER(dev);
    > tp = dev->priv;
    >
    > /* followed by ... */
    > dev->foo = __foo;
    > dev->bar = __bar;

    I don't understand how that helps compatibility over:

    dev->owner = THIS_MODULE;

    Both will:
    1) Work on 2.4 and 2.5
    2) Break on 2.2.

    Confused,
    Rusty.
    --
    Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
    -
    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    [W:0.018 / U:124.324 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site