• Gerd Knorr's avatar
    [PATCH] i2c #1/3: listify i2c core · 22f0b1c0
    Gerd Knorr authored
    This is the first of tree patches for i2c.  Trying to get the i2c
    cleanups finshed before 2.6.x, so we (hopefully) don't have a
    ever-changing i2c subsystem in 2.7.x again (which is very annonying for
    driver maintainance).
    
    Changes:
    
     * listify i2c-core, i.e. make it use <linux/list.h> instead of
       statically-sized arrays, removed lots of ugly code :)
     * added i2c_(get|put)_adapter, changed i2c-dev.c to use these
       functions instead maintaining is own adapter list.
     * killed the I2C_DF_DUMMY flag which had the strange semantics to
       make the i2c subsystem call driver->attach_adapter on detaches.
       Added a detach_adapter() callback instead.
     * some other minor cleanups along the way ...
    22f0b1c0
i2c-dev.c 11.7 KB