Lines Matching refs:handles
814 static struct sony_nc_handles *handles;
822 for (i = 0; i < ARRAY_SIZE(handles->cap); i++) {
823 len += sysfs_emit_at(buffer, len, "0x%.4x ", handles->cap[i]);
834 handles = kzalloc(sizeof(*handles), GFP_KERNEL);
835 if (!handles)
838 for (i = 0; i < ARRAY_SIZE(handles->cap); i++) {
845 handles->cap[i] = result;
850 sysfs_attr_init(&handles->devattr.attr);
851 handles->devattr.attr.name = "handles";
852 handles->devattr.attr.mode = S_IRUGO;
853 handles->devattr.show = sony_nc_handles_show;
856 if (device_create_file(&pd->dev, &handles->devattr)) {
857 kfree(handles);
858 handles = NULL;
868 if (handles) {
870 device_remove_file(&pd->dev, &handles->devattr);
871 kfree(handles);
872 handles = NULL;
882 if (!handles || !handle)
886 if (handles->cap[i] == handle) {
1195 if (offset >= ARRAY_SIZE(handles->cap)) {
1200 handle = handles->cap[offset];
1202 /* list of handles known for generating events */
1297 if (!handles)
1300 /* setup found handles here */
1301 for (i = 0; i < ARRAY_SIZE(handles->cap); i++) {
1302 unsigned int handle = handles->cap[i];
1427 if (!handles)
1434 /* cleanup handles here */
1435 for (i = 0; i < ARRAY_SIZE(handles->cap); i++) {
1437 handle = handles->cap[i];
1499 /* finally cleanup the handles list */
1510 for (i = 0; i < ARRAY_SIZE(handles->cap); i++) {
1511 unsigned int handle = handles->cap[i];
1872 /* verify the kbd backlight presence, some of these handles are not used
3203 /* retrieve the available handles */