Lines Matching refs:zcdndev
160 struct zcdn_device *zcdndev = to_zcdn_dev(dev); in ioctlmask_show() local
167 for (i = 0; i < sizeof(zcdndev->perms.ioctlm) / sizeof(long); i++) in ioctlmask_show()
168 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.ioctlm[i]); in ioctlmask_show()
181 struct zcdn_device *zcdndev = to_zcdn_dev(dev); in ioctlmask_store() local
183 rc = ap_parse_mask_str(buf, zcdndev->perms.ioctlm, in ioctlmask_store()
197 struct zcdn_device *zcdndev = to_zcdn_dev(dev); in apmask_show() local
204 for (i = 0; i < sizeof(zcdndev->perms.apm) / sizeof(long); i++) in apmask_show()
205 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.apm[i]); in apmask_show()
218 struct zcdn_device *zcdndev = to_zcdn_dev(dev); in apmask_store() local
220 rc = ap_parse_mask_str(buf, zcdndev->perms.apm, in apmask_store()
234 struct zcdn_device *zcdndev = to_zcdn_dev(dev); in aqmask_show() local
241 for (i = 0; i < sizeof(zcdndev->perms.aqm) / sizeof(long); i++) in aqmask_show()
242 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.aqm[i]); in aqmask_show()
255 struct zcdn_device *zcdndev = to_zcdn_dev(dev); in aqmask_store() local
257 rc = ap_parse_mask_str(buf, zcdndev->perms.aqm, in aqmask_store()
271 struct zcdn_device *zcdndev = to_zcdn_dev(dev); in admask_show() local
278 for (i = 0; i < sizeof(zcdndev->perms.adm) / sizeof(long); i++) in admask_show()
279 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.adm[i]); in admask_show()
292 struct zcdn_device *zcdndev = to_zcdn_dev(dev); in admask_store() local
294 rc = ap_parse_mask_str(buf, zcdndev->perms.adm, in admask_store()
357 struct zcdn_device *zcdndev = to_zcdn_dev(dev); in zcdn_device_release() local
362 kfree(zcdndev); in zcdn_device_release()
369 struct zcdn_device *zcdndev; in zcdn_create() local
376 zcdndev = find_zcdndev_by_name(name); in zcdn_create()
377 if (zcdndev) { in zcdn_create()
378 put_device(&zcdndev->device); in zcdn_create()
387 zcdndev = find_zcdndev_by_devt(devt); in zcdn_create()
388 if (zcdndev) in zcdn_create()
389 put_device(&zcdndev->device); in zcdn_create()
399 zcdndev = kzalloc(sizeof(*zcdndev), GFP_KERNEL); in zcdn_create()
400 if (!zcdndev) { in zcdn_create()
404 zcdndev->device.release = zcdn_device_release; in zcdn_create()
405 zcdndev->device.class = zcrypt_class; in zcdn_create()
406 zcdndev->device.devt = devt; in zcdn_create()
407 zcdndev->device.groups = zcdn_dev_attr_groups; in zcdn_create()
409 rc = dev_set_name(&zcdndev->device, "%s", name); in zcdn_create()
411 rc = dev_set_name(&zcdndev->device, ZCRYPT_NAME "_%d", (int)MINOR(devt)); in zcdn_create()
413 kfree(zcdndev); in zcdn_create()
416 rc = device_register(&zcdndev->device); in zcdn_create()
418 put_device(&zcdndev->device); in zcdn_create()
433 struct zcdn_device *zcdndev; in zcdn_destroy() local
439 zcdndev = find_zcdndev_by_name(name); in zcdn_destroy()
440 if (!zcdndev) { in zcdn_destroy()
449 put_device(&zcdndev->device); in zcdn_destroy()
450 device_unregister(&zcdndev->device); in zcdn_destroy()
461 struct zcdn_device *zcdndev; in zcdn_destroy_all() local
466 zcdndev = find_zcdndev_by_devt(devt); in zcdn_destroy_all()
467 if (zcdndev) { in zcdn_destroy_all()
468 put_device(&zcdndev->device); in zcdn_destroy_all()
469 device_unregister(&zcdndev->device); in zcdn_destroy_all()
507 struct zcdn_device *zcdndev; in zcrypt_open() local
511 zcdndev = find_zcdndev_by_devt(filp->f_inode->i_rdev); in zcrypt_open()
514 if (zcdndev) in zcrypt_open()
515 perms = &zcdndev->perms; in zcrypt_open()
531 struct zcdn_device *zcdndev; in zcrypt_release() local
534 zcdndev = find_zcdndev_by_devt(filp->f_inode->i_rdev); in zcrypt_release()
536 if (zcdndev) { in zcrypt_release()
538 put_device(&zcdndev->device); in zcrypt_release()
539 put_device(&zcdndev->device); in zcrypt_release()