patch-2.4.10 linux/drivers/net/wan/sdla_chdlc.c

Next file: linux/drivers/net/wan/sdla_fr.c
Previous file: linux/drivers/net/wan/sdla.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/net/wan/sdla_chdlc.c linux/drivers/net/wan/sdla_chdlc.c
@@ -48,6 +48,7 @@
 * Aug 07, 1998	David Fong	Initial version.
 *****************************************************************************/
 
+#include <linux/module.h>
 #include <linux/version.h>
 #include <linux/kernel.h>	/* printk(), and other useful stuff */
 #include <linux/stddef.h>	/* offsetof(), etc. */
@@ -505,13 +506,13 @@
 		/* For Primary Port 0 */
 		card->wandev.mtu =
 			(conf->mtu >= MIN_LGTH_CHDLC_DATA_CFG) ?
-			min(unsigned int, conf->mtu, PRI_MAX_NO_DATA_BYTES_IN_FRAME) :
+			min_t(unsigned int, conf->mtu, PRI_MAX_NO_DATA_BYTES_IN_FRAME) :
 			CHDLC_DFLT_DATA_LEN;
 	} else if(port_num == WANOPT_SEC) { 
 		/* For Secondary Port 1 */
 		card->wandev.mtu =
 			(conf->mtu >= MIN_LGTH_CHDLC_DATA_CFG) ?
-			min(unsigned int, conf->mtu, SEC_MAX_NO_DATA_BYTES_IN_FRAME) :
+			min_t(unsigned int, conf->mtu, SEC_MAX_NO_DATA_BYTES_IN_FRAME) :
 			CHDLC_DFLT_DATA_LEN;
 	}
 
@@ -827,19 +828,19 @@
 			card->u.c.kpalv_tx =
 				((conf->keepalive_tx_tmr - MIN_Tx_KPALV_TIMER)
 				>= 0) ?
-	   			min(unsigned int, conf->keepalive_tx_tmr,MAX_Tx_KPALV_TIMER) :
+	   			min_t(unsigned int, conf->keepalive_tx_tmr,MAX_Tx_KPALV_TIMER) :
 				DEFAULT_Tx_KPALV_TIMER;
 
 			card->u.c.kpalv_rx =
 		   		((conf->keepalive_rx_tmr - MIN_Rx_KPALV_TIMER)
 				>= 0) ?
-	   			min(unsigned int, conf->keepalive_rx_tmr,MAX_Rx_KPALV_TIMER) :
+	   			min_t(unsigned int, conf->keepalive_rx_tmr,MAX_Rx_KPALV_TIMER) :
 				DEFAULT_Rx_KPALV_TIMER;
 
 			card->u.c.kpalv_err =
 		   		((conf->keepalive_err_margin-MIN_KPALV_ERR_TOL)
 				>= 0) ?
-	   			min(unsigned int, conf->keepalive_err_margin,
+	   			min_t(unsigned int, conf->keepalive_err_margin,
 				MAX_KPALV_ERR_TOL) : 
 	   			DEFAULT_KPALV_ERR_TOL;
 		}
@@ -847,7 +848,7 @@
 		/* Setup slarp timer to control delay between slarps */
 		card->u.c.slarp_timer = 
 			((conf->slarp_timer - MIN_SLARP_REQ_TIMER) >= 0) ?
-			min(unsigned int, conf->slarp_timer, MAX_SLARP_REQ_TIMER) :
+			min_t(unsigned int, conf->slarp_timer, MAX_SLARP_REQ_TIMER) :
 			DEFAULT_SLARP_REQ_TIMER;
 
 #ifdef LINUX_2_0
@@ -4740,5 +4741,7 @@
 
 #endif
 
+
+MODULE_LICENSE("GPL");
 
 /****** End ****************************************************************/

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)