changeset 179:ac23a9b417a2

Support Linux kernel version >= 3.8 Add ld opt -lm
author Naoya OYAMA <naoya.oyama@gmail.com>
date Fri, 03 May 2013 11:00:11 +0900
parents a0bc3700a496
children 2659ebefb192
files configure driver/pt1_pci.c
diffstat 2 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Wed Nov 07 23:26:22 2012 +0900
+++ b/configure	Fri May 03 11:00:11 2013 +0900
@@ -681,7 +681,7 @@
 
   add_extralibs `pkg-config libupnp --libs`
   add_extralibs `pkg-config libdlna --libs`
-  add_extralibs -lrt
+  add_extralibs -lrt -lm
 fi
 
 #################################################
--- a/driver/pt1_pci.c	Wed Nov 07 23:26:22 2012 +0900
+++ b/driver/pt1_pci.c	Fri May 03 11:00:11 2013 +0900
@@ -46,7 +46,11 @@
 #include	"pt1_ioctl.h"
 
 /* These identify the driver base version and may not be removed. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
 static char version[] __devinitdata =
+#else
+static char version[] =
+#endif
 DRV_NAME ".c: " DRV_VERSION " " DRV_RELDATE " \n";
 
 MODULE_AUTHOR("Tomoaki Ishikawa tomy@users.sourceforge.jp and Yoshiki Yazawa yaz@honeyplanet.jp");
@@ -688,7 +692,11 @@
 	}
 	return 0 ;
 }
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
 static int __devinit pt1_pci_init_one (struct pci_dev *pdev,
+#else
+static int pt1_pci_init_one (struct pci_dev *pdev,
+#endif
 				     const struct pci_device_id *ent)
 {
 	int			rc ;
@@ -914,7 +922,11 @@
 
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
 static void __devexit pt1_pci_remove_one(struct pci_dev *pdev)
+#else
+static void pt1_pci_remove_one(struct pci_dev *pdev)
+#endif
 {
 
 	int		lp ;
@@ -981,7 +993,11 @@
 static struct pci_driver pt1_driver = {
 	.name		= DRV_NAME,
 	.probe		= pt1_pci_init_one,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
 	.remove		= __devexit_p(pt1_pci_remove_one),
+#else
+	.remove		= pt1_pci_remove_one,
+#endif
 	.id_table	= pt1_pci_tbl,
 #ifdef CONFIG_PM
 	.suspend	= pt1_pci_suspend,