[svn-commits] tzafrir: linux/trunk r9715 - /linux/trunk/drivers/dahdi/xpp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jan 30 12:31:38 CST 2011


Author: tzafrir
Date: Sun Jan 30 12:31:35 2011
New Revision: 9715

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9715
Log:
xpp: remove unused XPD_STATE() "protocol method"

Folded XPD_STATE() "protocol method" into the card_state() method.
It was only called from these (otherwise empty) methods.

Also it is not a "protocol method" for a very very very long time.

Signed-off-by: Oron Peled <oron at actcom.co.il>
Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

Modified:
    linux/trunk/drivers/dahdi/xpp/card_bri.c
    linux/trunk/drivers/dahdi/xpp/card_fxo.c
    linux/trunk/drivers/dahdi/xpp/card_fxs.c
    linux/trunk/drivers/dahdi/xpp/card_pri.c

Modified: linux/trunk/drivers/dahdi/xpp/card_bri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_bri.c?view=diff&rev=9715&r1=9714&r2=9715
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_bri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_bri.c Sun Jan 30 12:31:35 2011
@@ -1443,26 +1443,9 @@
 	}
 }
 
+
+
 /*---------------- BRI: HOST COMMANDS -------------------------------------*/
-
-static /* 0x0F */ HOSTCMD(BRI, XPD_STATE, bool on)
-{
-	struct BRI_priv_data	*priv;
-
-	BUG_ON(!xpd);
-	priv = xpd->priv;
-	XPD_DBG(GENERAL, xpd, "%s\n", (on)?"ON":"OFF");
-	if(on) {
-		if(!test_bit(HFC_L1_ACTIVATED, &priv->l1_flags)) {
-			if( ! IS_NT(xpd))
-				te_activation(xpd, 1);
-			else
-				nt_activation(xpd, 1);
-		}
-	} else if(IS_NT(xpd))
-		nt_activation(xpd, 0);
-	return 0;
-}
 
 static /* 0x33 */ HOSTCMD(BRI, SET_LED, enum bri_led_names which_led, enum led_state to_led_state)
 {
@@ -1671,7 +1654,21 @@
 
 static int BRI_card_state(xpd_t *xpd, bool on)
 {
-	return CALL_PROTO(BRI, XPD_STATE, xpd->xbus, xpd, on);
+	struct BRI_priv_data	*priv;
+
+	BUG_ON(!xpd);
+	priv = xpd->priv;
+	XPD_DBG(GENERAL, xpd, "%s\n", (on)?"ON":"OFF");
+	if(on) {
+		if(!test_bit(HFC_L1_ACTIVATED, &priv->l1_flags)) {
+			if( ! IS_NT(xpd))
+				te_activation(xpd, 1);
+			else
+				nt_activation(xpd, 1);
+		}
+	} else if(IS_NT(xpd))
+		nt_activation(xpd, 0);
+	return 0;
 }
 
 static const struct xops	bri_xops = {

Modified: linux/trunk/drivers/dahdi/xpp/card_fxo.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxo.c?view=diff&rev=9715&r1=9714&r2=9715
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxo.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxo.c Sun Jan 30 12:31:35 2011
@@ -83,8 +83,6 @@
 
 /*---------------- FXO Protocol Commands ----------------------------------*/
 
-static /* 0x0F */ DECLARE_CMD(FXO, XPD_STATE, bool on);
-
 static bool fxo_packet_is_valid(xpacket_t *pack);
 static void fxo_packet_dump(const char *msg, xpacket_t *pack);
 #ifdef CONFIG_PROC_FS
@@ -511,7 +509,7 @@
 	BUG_ON(!priv);
 	timer_count = xpd->timer_count;
 	XPD_DBG(GENERAL, xpd, "%s\n", (on)?"ON":"OFF");
- 	PHONEDEV(xpd).span.spantype = "FXO";
+	PHONEDEV(xpd).span.spantype = "FXO";
 	for_each_line(xpd, i) {
 		struct dahdi_chan	*cur_chan = XPD_CHAN(xpd, i);
 
@@ -831,19 +829,6 @@
 }
 
 /*---------------- FXO: HOST COMMANDS -------------------------------------*/
-
-static /* 0x0F */ HOSTCMD(FXO, XPD_STATE, bool on)
-{
-	int			ret = 0;
-	struct FXO_priv_data	*priv;
-
-	BUG_ON(!xbus);
-	BUG_ON(!xpd);
-	priv = xpd->priv;
-	BUG_ON(!priv);
-	XPD_DBG(GENERAL, xpd, "%s\n", (on) ? "on" : "off");
-	return ret;
-}
 
 /*---------------- FXO: Astribank Reply Handlers --------------------------*/
 
@@ -1113,7 +1098,14 @@
 
 static int FXO_card_state(xpd_t *xpd, bool on)
 {
-	return CALL_PROTO(FXO, XPD_STATE, xpd->xbus, xpd, on);
+	int			ret = 0;
+	struct FXO_priv_data	*priv;
+
+	BUG_ON(!xpd);
+	priv = xpd->priv;
+	BUG_ON(!priv);
+	XPD_DBG(GENERAL, xpd, "%s\n", (on) ? "on" : "off");
+	return ret;
 }
 
 static const struct xops	fxo_xops = {

Modified: linux/trunk/drivers/dahdi/xpp/card_fxs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=9715&r1=9714&r2=9715
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxs.c Sun Jan 30 12:31:35 2011
@@ -103,8 +103,6 @@
 #define	REG_LOOPCLOSURE_LCR	BIT(0)	/* Loop Closure Detect Indicator. */
 
 /*---------------- FXS Protocol Commands ----------------------------------*/
-
-static /* 0x0F */ DECLARE_CMD(FXS, XPD_STATE, bool on);
 
 static bool fxs_packet_is_valid(xpacket_t *pack);
 static void fxs_packet_dump(const char *msg, xpacket_t *pack);
@@ -1158,14 +1156,6 @@
 }
 
 /*---------------- FXS: HOST COMMANDS -------------------------------------*/
-
-static /* 0x0F */ HOSTCMD(FXS, XPD_STATE, bool on)
-{
-	BUG_ON(!xbus);
-	BUG_ON(!xpd);
-	XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off");
-	return 0;
-}
 
 /*---------------- FXS: Astribank Reply Handlers --------------------------*/
 
@@ -1396,7 +1386,9 @@
 
 static int FXS_card_state(xpd_t *xpd, bool on)
 {
-	return CALL_PROTO(FXS, XPD_STATE, xpd->xbus, xpd, on);
+	BUG_ON(!xpd);
+	XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off");
+	return 0;
 }
 
 static const struct xops	fxs_xops = {

Modified: linux/trunk/drivers/dahdi/xpp/card_pri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_pri.c?view=diff&rev=9715&r1=9714&r2=9715
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_pri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_pri.c Sun Jan 30 12:31:35 2011
@@ -1866,14 +1866,9 @@
 	return -ENOENT;
 }
 
+
+
 /*---------------- PRI: HOST COMMANDS -------------------------------------*/
-
-static /* 0x0F */ HOSTCMD(PRI, XPD_STATE, bool on)
-{
-	BUG_ON(!xpd);
-	XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off");
-	return 0;
-}
 
 static /* 0x33 */ HOSTCMD(PRI, SET_LED, enum pri_led_selectors led_sel, enum pri_led_state to_led_state)
 {
@@ -2170,7 +2165,9 @@
 
 static int PRI_card_state(xpd_t *xpd, bool on)
 {
-	return CALL_PROTO(PRI, XPD_STATE, xpd->xbus, xpd, on);
+	BUG_ON(!xpd);
+	XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off");
+	return 0;
 }
 
 static const struct xops	pri_xops = {
@@ -2629,7 +2626,6 @@
 
 static	DEVICE_ATTR(pri_clocking, S_IRUGO, pri_clocking_show, NULL);
 
-
 static int pri_xpd_probe(struct device *dev)
 {
 	xpd_t	*xpd;




More information about the svn-commits mailing list