Lines Matching refs:zc

42 	struct zcrypt_card *zc = dev_get_drvdata(dev);  in type_show()  local
44 return sysfs_emit(buf, "%s\n", zc->type_string); in type_show()
53 struct zcrypt_card *zc = dev_get_drvdata(dev); in online_show() local
55 int online = ac->config && zc->online ? 1 : 0; in online_show()
64 struct zcrypt_card *zc = dev_get_drvdata(dev); in online_store() local
76 zc->online = online; in online_store()
77 id = zc->card->id; in online_store()
90 list_for_each_entry(zq, &zc->zqueues, list) in online_store()
94 list_for_each_entry(zq, &zc->zqueues, list) in online_store()
119 struct zcrypt_card *zc = dev_get_drvdata(dev); in load_show() local
121 return sysfs_emit(buf, "%d\n", atomic_read(&zc->load)); in load_show()
139 struct zcrypt_card *zc; in zcrypt_card_alloc() local
141 zc = kzalloc(sizeof(*zc), GFP_KERNEL); in zcrypt_card_alloc()
142 if (!zc) in zcrypt_card_alloc()
144 INIT_LIST_HEAD(&zc->list); in zcrypt_card_alloc()
145 INIT_LIST_HEAD(&zc->zqueues); in zcrypt_card_alloc()
146 kref_init(&zc->refcount); in zcrypt_card_alloc()
147 return zc; in zcrypt_card_alloc()
151 void zcrypt_card_free(struct zcrypt_card *zc) in zcrypt_card_free() argument
153 kfree(zc); in zcrypt_card_free()
164 void zcrypt_card_get(struct zcrypt_card *zc) in zcrypt_card_get() argument
166 kref_get(&zc->refcount); in zcrypt_card_get()
170 int zcrypt_card_put(struct zcrypt_card *zc) in zcrypt_card_put() argument
172 return kref_put(&zc->refcount, zcrypt_card_release); in zcrypt_card_put()
182 int zcrypt_card_register(struct zcrypt_card *zc) in zcrypt_card_register() argument
187 list_add_tail(&zc->list, &zcrypt_card_list); in zcrypt_card_register()
190 zc->online = 1; in zcrypt_card_register()
193 __func__, zc->card->id); in zcrypt_card_register()
195 rc = sysfs_create_group(&zc->card->ap_dev.device.kobj, in zcrypt_card_register()
199 list_del_init(&zc->list); in zcrypt_card_register()
213 void zcrypt_card_unregister(struct zcrypt_card *zc) in zcrypt_card_unregister() argument
216 __func__, zc->card->id); in zcrypt_card_unregister()
219 list_del_init(&zc->list); in zcrypt_card_unregister()
221 sysfs_remove_group(&zc->card->ap_dev.device.kobj, in zcrypt_card_unregister()
223 zcrypt_card_put(zc); in zcrypt_card_unregister()