patch-2.4.10 linux/drivers/net/wan/comx-hw-comx.c

Next file: linux/drivers/net/wan/comx-hw-locomx.c
Previous file: linux/drivers/net/wan/c101.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/net/wan/comx-hw-comx.c linux/drivers/net/wan/comx-hw-comx.c
@@ -63,6 +63,7 @@
 
 MODULE_AUTHOR("Gergely Madarasz <gorgo@itc.hu>, Tivadar Szemethy <tiv@itc.hu>, Arpad Bakay");
 MODULE_DESCRIPTION("Hardware-level driver for the COMX and HICOMX adapters\n");
+MODULE_LICENSE("GPL");
 
 #define	COMX_readw(dev, offset)	(readw(dev->mem_start + offset + \
 	(unsigned int)(((struct comx_privdata *)\
@@ -1044,7 +1045,7 @@
 		if (!(page = (char *)__get_free_page(GFP_KERNEL))) {
 			return -ENOMEM;
 		}
-		if(copy_from_user(page, buffer, count = (min(int, count, PAGE_SIZE))))
+		if(copy_from_user(page, buffer, count = (min_t(int, count, PAGE_SIZE))))
 		{
 			count = -EFAULT;
 			goto out;
@@ -1182,8 +1183,8 @@
 			len = sprintf(page, "external\n");
 		}
 	} else if (strcmp(file->name, FILENAME_FIRMWARE) == 0) {
-		len = min(int, FILE_PAGESIZE,
-			  min(int, count, 
+		len = min_t(int, FILE_PAGESIZE,
+			  min_t(int, count, 
 			      hw->firmware ?
 			      (hw->firmware->len - off) : 0));
 		if (len < 0) {
@@ -1205,7 +1206,7 @@
 	if (count >= len - off) {
 		*eof = 1;
 	}
-	return min(int, count, len - off);
+	return min_t(int, count, len - off);
 }
 
 /* Called on echo comx >boardtype */

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