Lines Matching refs:cb
55 struct smsg_callback *cb; in smsg_message_pending() local
78 list_for_each_entry(cb, &smsg_list, list) in smsg_message_pending()
79 if (strncmp(buffer + 8, cb->prefix, cb->len) == 0) { in smsg_message_pending()
80 cb->callback(sender, buffer + 8); in smsg_message_pending()
91 struct smsg_callback *cb; in smsg_register_callback() local
93 cb = kmalloc(sizeof(struct smsg_callback), GFP_KERNEL); in smsg_register_callback()
94 if (!cb) in smsg_register_callback()
96 cb->prefix = prefix; in smsg_register_callback()
97 cb->len = strlen(prefix); in smsg_register_callback()
98 cb->callback = callback; in smsg_register_callback()
100 list_add_tail(&cb->list, &smsg_list); in smsg_register_callback()
109 struct smsg_callback *cb, *tmp; in smsg_unregister_callback() local
112 cb = NULL; in smsg_unregister_callback()
116 cb = tmp; in smsg_unregister_callback()
117 list_del(&cb->list); in smsg_unregister_callback()
121 kfree(cb); in smsg_unregister_callback()