Lines Matching refs:handles
814 static struct sony_nc_handles *handles; variable
822 for (i = 0; i < ARRAY_SIZE(handles->cap); i++) { in sony_nc_handles_show()
824 handles->cap[i]); in sony_nc_handles_show()
835 handles = kzalloc(sizeof(*handles), GFP_KERNEL); in sony_nc_handles_setup()
836 if (!handles) in sony_nc_handles_setup()
839 for (i = 0; i < ARRAY_SIZE(handles->cap); i++) { in sony_nc_handles_setup()
846 handles->cap[i] = result; in sony_nc_handles_setup()
851 sysfs_attr_init(&handles->devattr.attr); in sony_nc_handles_setup()
852 handles->devattr.attr.name = "handles"; in sony_nc_handles_setup()
853 handles->devattr.attr.mode = S_IRUGO; in sony_nc_handles_setup()
854 handles->devattr.show = sony_nc_handles_show; in sony_nc_handles_setup()
857 if (device_create_file(&pd->dev, &handles->devattr)) { in sony_nc_handles_setup()
858 kfree(handles); in sony_nc_handles_setup()
859 handles = NULL; in sony_nc_handles_setup()
869 if (handles) { in sony_nc_handles_cleanup()
871 device_remove_file(&pd->dev, &handles->devattr); in sony_nc_handles_cleanup()
872 kfree(handles); in sony_nc_handles_cleanup()
873 handles = NULL; in sony_nc_handles_cleanup()
883 if (!handles || !handle) in sony_find_snc_handle()
887 if (handles->cap[i] == handle) { in sony_find_snc_handle()
1196 if (offset >= ARRAY_SIZE(handles->cap)) { in sony_nc_notify()
1201 handle = handles->cap[offset]; in sony_nc_notify()
1298 if (!handles) in sony_nc_function_setup()
1302 for (i = 0; i < ARRAY_SIZE(handles->cap); i++) { in sony_nc_function_setup()
1303 unsigned int handle = handles->cap[i]; in sony_nc_function_setup()
1428 if (!handles) in sony_nc_function_cleanup()
1436 for (i = 0; i < ARRAY_SIZE(handles->cap); i++) { in sony_nc_function_cleanup()
1438 handle = handles->cap[i]; in sony_nc_function_cleanup()
1511 for (i = 0; i < ARRAY_SIZE(handles->cap); i++) { in sony_nc_function_resume()
1512 unsigned int handle = handles->cap[i]; in sony_nc_function_resume()