chan_alloc: remove ts_alloc() and ts_free()

The idea of ts_alloc()/ts_free() dates back to the very early days of
OpenBSC, where we didn't yet have a fixed PCHAN type assigned for every
lchan in a BTS.  However, ever since, PCHAN types (channel combinations)
are configured by OML in a certain way, and we only allocate LCHANs
inside PCHANs of a matching type.  There should be no PCHANs with
type GSM_PCHAN_NONE, unless those that you don't want to use for
administraive reasons or the like.
diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c
index 9936ac7..c86556b 100644
--- a/openbsc/src/libbsc/chan_alloc.c
+++ b/openbsc/src/libbsc/chan_alloc.c
@@ -58,97 +58,6 @@
 	return 1;
 }
 
-struct gsm_bts_trx_ts *ts_c0_alloc(struct gsm_bts *bts,
-				   enum gsm_phys_chan_config pchan)
-{
-	struct gsm_bts_trx *trx = bts->c0;
-	struct gsm_bts_trx_ts *ts = &trx->ts[0];
-
-	if (pchan != GSM_PCHAN_CCCH &&
-	    pchan != GSM_PCHAN_CCCH_SDCCH4 &&
-	    pchan != GSM_PCHAN_CCCH_SDCCH4_CBCH)
-		return NULL;
-
-	if (ts->pchan != GSM_PCHAN_NONE)
-		return NULL;
-
-	ts->pchan = pchan;
-
-	return ts;
-}
-
-/* Allocate a physical channel (TS) */
-struct gsm_bts_trx_ts *ts_alloc(struct gsm_bts *bts,
-				enum gsm_phys_chan_config pchan)
-{
-	int j;
-	struct gsm_bts_trx *trx;
-
-	llist_for_each_entry(trx, &bts->trx_list, list) {
-		int from, to;
-
-		if (!trx_is_usable(trx))
-			continue;
-
-		/* the following constraints are pure policy,
-		 * no requirement to put this restriction in place */
-		if (trx == bts->c0) {
-			/* On the first TRX we run one CCCH and one SDCCH8 */
-			switch (pchan) {
-			case GSM_PCHAN_CCCH:
-			case GSM_PCHAN_CCCH_SDCCH4:
-			case GSM_PCHAN_CCCH_SDCCH4_CBCH:
-				from = 0; to = 0;
-				break;
-			case GSM_PCHAN_TCH_F:
-			case GSM_PCHAN_TCH_H:
-				from = 1; to = 7;
-				break;
-			case GSM_PCHAN_SDCCH8_SACCH8C:
-			case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
-			default:
-				return NULL;
-			}
-		} else {
-			/* Every secondary TRX is configured for TCH/F
-			 * and TCH/H only */
-			switch (pchan) {
-			case GSM_PCHAN_SDCCH8_SACCH8C:
-			case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
-				from = 1; to = 1;
-				break;
-			case GSM_PCHAN_TCH_F:
-			case GSM_PCHAN_TCH_H:
-				from = 1; to = 7;
-				break;
-			default:
-				return NULL;
-			}
-		}
-
-		for (j = from; j <= to; j++) {
-			struct gsm_bts_trx_ts *ts = &trx->ts[j];
-
-			if (!ts_is_usable(ts))
-				continue;
-
-			if (ts->pchan == GSM_PCHAN_NONE) {
-				ts->pchan = pchan;
-				/* set channel attribute on OML */
-				abis_nm_set_channel_attr(ts, abis_nm_chcomb4pchan(pchan));
-				return ts;
-			}
-		}
-	}
-	return NULL;
-}
-
-/* Free a physical channel (TS) */
-void ts_free(struct gsm_bts_trx_ts *ts)
-{
-	ts->pchan = GSM_PCHAN_NONE;
-}
-
 static const uint8_t subslots_per_pchan[] = {
 	[GSM_PCHAN_NONE] = 0,
 	[GSM_PCHAN_CCCH] = 0,
@@ -200,7 +109,6 @@
 _lc_find_bts(struct gsm_bts *bts, enum gsm_phys_chan_config pchan)
 {
 	struct gsm_bts_trx *trx;
-	struct gsm_bts_trx_ts *ts;
 	struct gsm_lchan *lc;
 
 	if (bts->chan_alloc_reverse) {
@@ -217,20 +125,7 @@
 		}
 	}
 
-	/* we cannot allocate more of these */
-	if (pchan == GSM_PCHAN_CCCH_SDCCH4 ||
-	    pchan == GSM_PCHAN_CCCH_SDCCH4_CBCH ||
-	    pchan == GSM_PCHAN_SDCCH8_SACCH8C_CBCH)
-		return NULL;
-
-	/* if we've reached here, we need to allocate a new physical
-	 * channel for the logical channel type requested */
-	ts = ts_alloc(bts, pchan);
-	if (!ts) {
-		/* no more radio resources */
-		return NULL;
-	}
-	return &ts->lchan[0];
+	return NULL;
 }
 
 /* Allocate a logical channel */