/* Get a bandwidth table index associated with a bandwidth value.  */
static bool sensor_band_index(const sensor_caps_t *caps, int16_t band, int *index)
/* Get a bandwidth table index associated with a bandwidth value.  */
static bool sensor_band_index(const sensor_caps_t *caps, int16_t band, int *index)
{
	if (caps && caps->band_table) {
		for (int i = 0; i < caps->band_count; ++i) {
			if (caps->band_table[i].bandwidth_Hz == band) {
				*index = i;
				return true;
			}
		}
	}
	return false;
}