OSDN Git Service

clk: Implement clk_unregister
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Sat, 24 Aug 2013 13:00:10 +0000 (15:00 +0200)
committerSylwester Nawrocki <s.nawrocki@samsung.com>
Wed, 4 Dec 2013 16:19:52 +0000 (17:19 +0100)
commitfcb0ee6a3d331fb23dbb546500021f6e4cac5689
treeaeb616745828ea298e1a793cfc819e9b8401bc0d
parentac2df527fb407b61f9c812a99035b62a75a77d6d
clk: Implement clk_unregister

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: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/clk/clk.c
include/linux/clk-private.h