Lines Matching refs:cn
933 struct clk_notifier *cn; in __clk_notify() local
941 list_for_each_entry(cn, &clk_notifier_list, node) { in __clk_notify()
942 if (cn->clk == clk) { in __clk_notify()
943 ret = srcu_notifier_call_chain(&cn->notifier_head, msg, in __clk_notify()
1889 struct clk_notifier *cn; in clk_notifier_register() local
1898 list_for_each_entry(cn, &clk_notifier_list, node) in clk_notifier_register()
1899 if (cn->clk == clk) in clk_notifier_register()
1903 if (cn->clk != clk) { in clk_notifier_register()
1904 cn = kzalloc(sizeof(struct clk_notifier), GFP_KERNEL); in clk_notifier_register()
1905 if (!cn) in clk_notifier_register()
1908 cn->clk = clk; in clk_notifier_register()
1909 srcu_init_notifier_head(&cn->notifier_head); in clk_notifier_register()
1911 list_add(&cn->node, &clk_notifier_list); in clk_notifier_register()
1914 ret = srcu_notifier_chain_register(&cn->notifier_head, nb); in clk_notifier_register()
1938 struct clk_notifier *cn = NULL; in clk_notifier_unregister() local
1946 list_for_each_entry(cn, &clk_notifier_list, node) in clk_notifier_unregister()
1947 if (cn->clk == clk) in clk_notifier_unregister()
1950 if (cn->clk == clk) { in clk_notifier_unregister()
1951 ret = srcu_notifier_chain_unregister(&cn->notifier_head, nb); in clk_notifier_unregister()
1956 if (!cn->notifier_head.head) { in clk_notifier_unregister()
1957 srcu_cleanup_notifier_head(&cn->notifier_head); in clk_notifier_unregister()
1958 list_del(&cn->node); in clk_notifier_unregister()
1959 kfree(cn); in clk_notifier_unregister()