• Sylwester Nawrocki's avatar
    clk: Implement clk_unregister · fcb0ee6a
    Sylwester Nawrocki authored
    clk_unregister() is currently not implemented and it is required when
    a clock provider module needs to be unloaded.
    
    Normally the clock supplier module is prevented to be unloaded by
    taking reference on the module in clk_get().
    
    For cases when the clock supplier module deinitializes despite the
    consumers of its clocks holding a reference on the module, e.g. when
    the driver is unbound through "unbind" sysfs attribute, there are
    empty clock ops added. These ops are assigned temporarily to struct
    clk and used until all consumers release the clock, to avoid invoking
    callbacks from the module which just got removed.
    Signed-off-by: default avatarJiada Wang <jiada_wang@mentor.com>
    Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
    Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    fcb0ee6a
clk.c 57.8 KB