lkml.org 
[lkml]   [2004]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: two patches - request for comments
    Andrew Zabolotny wrote:
    > No. class_find_device was written for lcd_find_device() and
    > backlight_find_device() (framebuffer devices use them). On the other hand,
    > the driver that registers the backlight device doesn't have a pointer to the
    > class device (well, the lcd_register_device could return it). Since the
    > lcd/backlight names are unique anyway, I don't see any problems with that, and
    > moreover, it is *registered* by giving it a name, why it should be
    > unregistered in a different way?


    Typical Linux usage to an item being registered is

    ptr = alloc_foo()
    register_foo(ptr)
    unregister_foo(ptr)
    free_foo()

    It is quite unusual to unregister based on name. Pointers are far more
    likely to be unique, and the programmer is far less likely to screw up
    the unregister operation.

    Jeff


    -
    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 14:03    [W:0.021 / U:31.556 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site