summaryrefslogtreecommitdiff
path: root/backport
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-11-06 17:53:50 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2013-11-07 20:02:20 +0100
commit2cdcb05222926e10806a44d2ab923c4a2090f979 (patch)
tree47797fc351b86c97c9219bc3b6c2fc181aee2046 /backport
parentfe79a8729088b215f6e418d84ffc49a787cbd1b6 (diff)
backports: do not build tty backport if it is not in the kernel
The backported parts of tty are depending on tty being build into the kernel, deactivate them if tty was not activated in the kernel config. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'backport')
-rw-r--r--backport/compat/backport-3.10.c2
-rw-r--r--backport/compat/compat-2.6.28.c2
-rw-r--r--backport/compat/compat-2.6.39.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/backport/compat/backport-3.10.c b/backport/compat/backport-3.10.c
index f4452502..07a8dacc 100644
--- a/backport/compat/backport-3.10.c
+++ b/backport/compat/backport-3.10.c
@@ -95,6 +95,7 @@ unsigned int get_random_int(void)
EXPORT_SYMBOL_GPL(get_random_int);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
+#ifdef CONFIG_TTY
/**
* tty_port_tty_wakeup - helper to wake up a tty
*
@@ -126,4 +127,5 @@ void tty_port_tty_hangup(struct tty_port *port, bool check_clocal)
tty_kref_put(tty);
}
EXPORT_SYMBOL_GPL(tty_port_tty_hangup);
+#endif /* CONFIG_TTY */
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) */
diff --git a/backport/compat/compat-2.6.28.c b/backport/compat/compat-2.6.28.c
index e38004f1..1a4b01da 100644
--- a/backport/compat/compat-2.6.28.c
+++ b/backport/compat/compat-2.6.28.c
@@ -318,6 +318,7 @@ void v2_6_28_skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int
}
EXPORT_SYMBOL_GPL(v2_6_28_skb_add_rx_frag);
+#ifdef CONFIG_TTY
void tty_write_unlock(struct tty_struct *tty)
{
mutex_unlock(&tty->atomic_write_lock);
@@ -443,6 +444,7 @@ int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
}
}
EXPORT_SYMBOL_GPL(n_tty_ioctl_helper);
+#endif /* CONFIG_TTY */
#ifdef CONFIG_PCI
/**
diff --git a/backport/compat/compat-2.6.39.c b/backport/compat/compat-2.6.39.c
index 62d8a666..44796da1 100644
--- a/backport/compat/compat-2.6.39.c
+++ b/backport/compat/compat-2.6.39.c
@@ -14,6 +14,7 @@
#include <linux/module.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+#ifdef CONFIG_TTY
/*
* Termios Helper Methods
*/
@@ -111,5 +112,6 @@ int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
return 0;
}
EXPORT_SYMBOL_GPL(tty_set_termios);
+#endif /* CONFIG_TTY */
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) */