| 165 | | if (! (featureptr = sensors_lookup_feature_nr(name.prefix,feature))) |
| 166 | | return -SENSORS_ERR_NO_ENTRY; |
| 167 | | if (! (featureptr->mode && SENSORS_R)) |
| | 167 | if (! (main_feature = sensors_lookup_feature_nr(name.prefix,feature))) |
| | 168 | return -SENSORS_ERR_NO_ENTRY; |
| | 169 | if (main_feature->compute_mapping == SENSORS_NO_MAPPING) |
| | 170 | alt_feature = NULL; |
| | 171 | else if (! (alt_feature = |
| | 172 | sensors_lookup_feature_nr(name.prefix, |
| | 173 | main_feature->compute_mapping))) |
| | 174 | return -SENSORS_ERR_NO_ENTRY; |
| | 175 | if (! (main_feature->mode && SENSORS_R)) |
| 170 | | for (i = 0; !expr && (i < chip->computes_count); i++) |
| 171 | | if (!strcmp(featureptr->name,chip->computes->name)) |
| 172 | | expr = chip->computes->from_proc; |
| | 178 | for (i = 0; !final_expr && (i < chip->computes_count); i++) { |
| | 179 | if (!strcmp(main_feature->name,chip->computes[i].name)) { |
| | 180 | expr = chip->computes[i].from_proc; |
| | 181 | final_expr = 1; |
| | 182 | } else if (alt_feature && |
| | 183 | !strcmp(alt_feature->name,chip->computes[i].name)) |
| | 184 | expr = chip->computes[i].from_proc; |
| | 185 | } |