• Thierry Reding's avatar
    drm/tegra: Properly reference count the DDC I2C adapter · 2340dc15
    Thierry Reding authored
    Use the of_get_i2c_adapter_by_node(), which is similar to the existing
    call to of_find_i2c_adapter_by_node() except that it also takes a
    reference to the owner module of the I2C adapter. In order to properly
    balance this out, call i2c_put_adapter() to release the reference to the
    I2C adapter and its owner module.
    
    For the special case where the DDC comes from the DPAUX, care must be
    taken to perform the same steps (i.e. get_device() and module_get()) so
    that the reference counts are all balanced.
    Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
    2340dc15
sor.c 100 KB