Lines Matching refs:avail
78 int index, avail = -1, i = 0, j = 0; in accel_create() local
89 if (avail < 0 && !inst[index].obj) { in accel_create()
90 avail = index; in accel_create()
94 if (avail < 0) { in accel_create()
101 (void)memset(&accel_data[avail], 0, sizeof(accel_data[avail])); in accel_create()
103 (void)memset(res[avail], 0, in accel_create()
104 sizeof(res[avail][0]) * ARRAY_SIZE(res[avail])); in accel_create()
105 init_res_instance(res_inst[avail], ARRAY_SIZE(res_inst[avail])); in accel_create()
108 INIT_OBJ_RES_DATA(X_VALUE_RID, res[avail], i, res_inst[avail], j, in accel_create()
109 &accel_data[avail].x_value, in accel_create()
110 sizeof(accel_data[avail].x_value)); in accel_create()
111 INIT_OBJ_RES_DATA(Y_VALUE_RID, res[avail], i, res_inst[avail], j, in accel_create()
112 &accel_data[avail].y_value, in accel_create()
113 sizeof(accel_data[avail].y_value)); in accel_create()
114 INIT_OBJ_RES_DATA(Z_VALUE_RID, res[avail], i, res_inst[avail], j, in accel_create()
115 &accel_data[avail].z_value, in accel_create()
116 sizeof(accel_data[avail].z_value)); in accel_create()
117 INIT_OBJ_RES_OPTDATA(SENSOR_UNITS_RID, res[avail], i, in accel_create()
118 res_inst[avail], j); in accel_create()
119 INIT_OBJ_RES_DATA(MIN_RANGE_VALUE_RID, res[avail], i, res_inst[avail], in accel_create()
120 j, &accel_data[avail].min_range, in accel_create()
121 sizeof(accel_data[avail].min_range)); in accel_create()
122 INIT_OBJ_RES_DATA(MAX_RANGE_VALUE_RID, res[avail], i, res_inst[avail], in accel_create()
123 j, &accel_data[avail].max_range, in accel_create()
124 sizeof(accel_data[avail].max_range)); in accel_create()
126 INIT_OBJ_RES_OPTDATA(APPLICATION_TYPE_RID, res[avail], i, in accel_create()
127 res_inst[avail], j); in accel_create()
128 INIT_OBJ_RES_OPTDATA(TIMESTAMP_RID, res[avail], i, res_inst[avail], j); in accel_create()
129 INIT_OBJ_RES_OPTDATA(FRACTIONAL_TIMESTAMP_RID, res[avail], i, in accel_create()
130 res_inst[avail], j); in accel_create()
131 INIT_OBJ_RES_OPTDATA(MEASUREMENT_QUALITY_INDICATOR_RID, res[avail], in accel_create()
132 i, res_inst[avail], j); in accel_create()
133 INIT_OBJ_RES_OPTDATA(MEASUREMENT_QUALITY_LEVEL_RID, res[avail], i, in accel_create()
134 res_inst[avail], j); in accel_create()
137 inst[avail].resources = res[avail]; in accel_create()
138 inst[avail].resource_count = i; in accel_create()
142 return &inst[avail]; in accel_create()