Lines Matching refs:avail
119 int index, avail = -1, i = 0, j = 0; in button_create() local
130 if (avail < 0 && !inst[index].obj) { in button_create()
131 avail = index; in button_create()
135 if (avail < 0) { in button_create()
142 (void)memset(&button_data[avail], 0, sizeof(button_data[avail])); in button_create()
143 button_data[avail].obj_inst_id = obj_inst_id; in button_create()
145 (void)memset(res[avail], 0, in button_create()
146 sizeof(res[avail][0]) * ARRAY_SIZE(res[avail])); in button_create()
147 init_res_instance(res_inst[avail], ARRAY_SIZE(res_inst[avail])); in button_create()
150 INIT_OBJ_RES(DIGITAL_INPUT_STATE_RID, res[avail], i, res_inst[avail], in button_create()
151 j, 1, false, true, &button_data[avail].state, in button_create()
152 sizeof(button_data[avail].state), in button_create()
154 INIT_OBJ_RES_DATA(DIGITAL_INPUT_COUNTER_RID, res[avail], i, in button_create()
155 res_inst[avail], j, in button_create()
156 &button_data[avail].counter, in button_create()
157 sizeof(button_data[avail].counter)); in button_create()
158 INIT_OBJ_RES_OPTDATA(APPLICATION_TYPE_RID, res[avail], i, in button_create()
159 res_inst[avail], j); in button_create()
161 INIT_OBJ_RES_OPTDATA(TIMESTAMP_RID, res[avail], i, res_inst[avail], j); in button_create()
162 INIT_OBJ_RES_OPTDATA(FRACTIONAL_TIMESTAMP_RID, res[avail], i, in button_create()
163 res_inst[avail], j); in button_create()
166 inst[avail].resources = res[avail]; in button_create()
167 inst[avail].resource_count = i; in button_create()
171 return &inst[avail]; in button_create()