backports: remove const from pci error handlers on kernel < 3.7
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 15 Jun 2014 17:08:25 +0000 (19:08 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 16 Jun 2014 18:23:38 +0000 (20:23 +0200)
This fixes a warning on these older kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
patches/collateral-evolutions/network/0042-pci_error_handlers/alx.patch [new file with mode: 0644]
patches/collateral-evolutions/network/0042-pci_error_handlers/atl1c.patch [new file with mode: 0644]
patches/collateral-evolutions/network/0042-pci_error_handlers/atl1e.patch [new file with mode: 0644]
patches/collateral-evolutions/network/0042-pci_error_handlers/ngene.patch [new file with mode: 0644]

diff --git a/patches/collateral-evolutions/network/0042-pci_error_handlers/alx.patch b/patches/collateral-evolutions/network/0042-pci_error_handlers/alx.patch
new file mode 100644 (file)
index 0000000..c26efa2
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -1521,7 +1521,11 @@ static void alx_pci_error_resume(struct
+       rtnl_unlock();
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ static const struct pci_error_handlers alx_err_handlers = {
++#else
++static struct pci_error_handlers alx_err_handlers = {
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
+       .error_detected = alx_pci_error_detected,
+       .slot_reset     = alx_pci_error_slot_reset,
+       .resume         = alx_pci_error_resume,
diff --git a/patches/collateral-evolutions/network/0042-pci_error_handlers/atl1c.patch b/patches/collateral-evolutions/network/0042-pci_error_handlers/atl1c.patch
new file mode 100644 (file)
index 0000000..239d1b9
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
++++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+@@ -2782,7 +2782,11 @@ static void atl1c_io_resume(struct pci_d
+       netif_device_attach(netdev);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ static const struct pci_error_handlers atl1c_err_handler = {
++#else
++static struct pci_error_handlers atl1c_err_handler = {
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
+       .error_detected = atl1c_io_error_detected,
+       .slot_reset = atl1c_io_slot_reset,
+       .resume = atl1c_io_resume,
diff --git a/patches/collateral-evolutions/network/0042-pci_error_handlers/atl1e.patch b/patches/collateral-evolutions/network/0042-pci_error_handlers/atl1e.patch
new file mode 100644 (file)
index 0000000..3ef2f93
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
++++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+@@ -2559,7 +2559,11 @@ static void atl1e_io_resume(struct pci_d
+       netif_device_attach(netdev);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ static const struct pci_error_handlers atl1e_err_handler = {
++#else
++static struct pci_error_handlers atl1e_err_handler = {
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
+       .error_detected = atl1e_io_error_detected,
+       .slot_reset = atl1e_io_slot_reset,
+       .resume = atl1e_io_resume,
diff --git a/patches/collateral-evolutions/network/0042-pci_error_handlers/ngene.patch b/patches/collateral-evolutions/network/0042-pci_error_handlers/ngene.patch
new file mode 100644 (file)
index 0000000..620dbbe
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/drivers/media/pci/ngene/ngene-cards.c
++++ b/drivers/media/pci/ngene/ngene-cards.c
+@@ -798,7 +798,11 @@ static void ngene_resume(struct pci_dev
+       printk(KERN_INFO DEVICE_NAME ": resume\n");
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ static const struct pci_error_handlers ngene_errors = {
++#else
++static struct pci_error_handlers ngene_errors = {
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
+       .error_detected = ngene_error_detected,
+       .link_reset = ngene_link_reset,
+       .slot_reset = ngene_slot_reset,