[packages/r8168] - fix building with kernel 3.8+
baggins
baggins at pld-linux.org
Tue Jun 4 13:14:44 CEST 2013
commit b9b35840e102ea13ffc041a0270d563a3d33777c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Jun 4 13:14:31 2013 +0200
- fix building with kernel 3.8+
linux-3.8.patch | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++
r8168-kernel-3.3.patch | 18 ---------------
r8168.spec | 2 ++
3 files changed, 64 insertions(+), 18 deletions(-)
---
diff --git a/r8168.spec b/r8168.spec
index 2176617..0425e2a 100644
--- a/r8168.spec
+++ b/r8168.spec
@@ -25,6 +25,7 @@ URL: http://www.realtek.com.tw/
# unfortunately this download is not DF-friendly.
Source0: %{pname}-%{version}.tar.bz2
# Source0-md5: 80b8d23e463e5408dced1b1377579dae
+Patch0: linux-3.8.patch
%if %{with kernel}
%if %{with dist_kernel}
BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.33
@@ -62,6 +63,7 @@ Express Gigabit Ethernet.
%prep
%setup -q -n %{pname}-%{version}
+%patch0 -p1
%build
%if %{with kernel}
diff --git a/linux-3.8.patch b/linux-3.8.patch
new file mode 100644
index 0000000..0a7ffaa
--- /dev/null
+++ b/linux-3.8.patch
@@ -0,0 +1,62 @@
+--- r8168-8.035.00/src/r8168_n.c.orig 2012-12-19 11:38:56.000000000 +0100
++++ r8168-8.035.00/src/r8168_n.c 2013-06-04 13:10:37.691818331 +0200
+@@ -14541,7 +14541,11 @@
+ spin_unlock_irqrestore(&tp->phy_lock, flags);
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+ static int __devinit
++#else
++static int
++#endif
+ rtl8168_init_board(struct pci_dev *pdev,
+ struct net_device **dev_out,
+ void __iomem **ioaddr_out)
+@@ -14711,7 +14711,11 @@
+ goto out;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+ static void __devinit
++#else
++static void
++#endif
+ rtl8168_init_sequence(struct rtl8168_private *tp)
+ {
+ void __iomem *ioaddr = tp->mmio_addr;
+@@ -14964,7 +14964,11 @@
+ };
+ #endif
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+ static int __devinit
++#else
++static int
++#endif
+ rtl8168_init_one(struct pci_dev *pdev,
+ const struct pci_device_id *ent)
+ {
+@@ -15128,7 +15128,11 @@
+ return 0;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+ static void __devexit
++#else
++static void
++#endif
+ rtl8168_remove_one(struct pci_dev *pdev)
+ {
+ struct net_device *dev = pci_get_drvdata(pdev);
+@@ -17649,7 +17649,11 @@
+ .name = MODULENAME,
+ .id_table = rtl8168_pci_tbl,
+ .probe = rtl8168_init_one,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+ .remove = __devexit_p(rtl8168_remove_one),
++#else
++ .remove = rtl8168_remove_one,
++#endif
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)
+ .shutdown = rtl8168_shutdown,
+ #endif
diff --git a/r8168-kernel-3.3.patch b/r8168-kernel-3.3.patch
deleted file mode 100644
index d8dbba5..0000000
--- a/r8168-kernel-3.3.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- r8168-8.029.00/src/r8168_n.c~ 2012-03-07 09:35:44.000000000 +0100
-+++ r8168-8.029.00/src/r8168_n.c 2012-04-06 22:17:27.068049894 +0200
-@@ -2229,6 +2229,7 @@
- .set_settings = rtl8168_set_settings,
- .get_msglevel = rtl8168_get_msglevel,
- .set_msglevel = rtl8168_set_msglevel,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
- .get_rx_csum = rtl8168_get_rx_csum,
- .set_rx_csum = rtl8168_set_rx_csum,
- .get_tx_csum = rtl8168_get_tx_csum,
-@@ -2239,6 +2240,7 @@
- .get_tso = ethtool_op_get_tso,
- .set_tso = ethtool_op_set_tso,
- #endif
-+#endif
- .get_regs = rtl8168_get_regs,
- .get_wol = rtl8168_get_wol,
- .set_wol = rtl8168_set_wol,
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/r8168.git/commitdiff/b9b35840e102ea13ffc041a0270d563a3d33777c
More information about the pld-cvs-commit
mailing list