diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2014-02-15 23:24:26 +0200 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2014-02-15 23:24:26 +0200 |
commit | 7224c1253228e5c29c78cb3f0f26ce34770f2356 (patch) | |
tree | 1684924656132935256e034f35f92abee6623265 /sys-kernel/compat-drivers/files/compat-drivers-3.8-bt_tty.patch |
Added ebuilds for kogaion desktop
Diffstat (limited to 'sys-kernel/compat-drivers/files/compat-drivers-3.8-bt_tty.patch')
-rw-r--r-- | sys-kernel/compat-drivers/files/compat-drivers-3.8-bt_tty.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sys-kernel/compat-drivers/files/compat-drivers-3.8-bt_tty.patch b/sys-kernel/compat-drivers/files/compat-drivers-3.8-bt_tty.patch new file mode 100644 index 00000000..dd299121 --- /dev/null +++ b/sys-kernel/compat-drivers/files/compat-drivers-3.8-bt_tty.patch @@ -0,0 +1,37 @@ +--- compat-drivers-3.8-rc7-1-u.orig/net/bluetooth/rfcomm/tty.c 2013-02-11 00:31:59.000000000 +0100 ++++ compat-drivers-3.8-rc7-1-u/net/bluetooth/rfcomm/tty.c 2013-02-13 12:39:58.983001215 +0100 +@@ -309,7 +309,7 @@ + BUG_ON(test_and_set_bit(RFCOMM_TTY_RELEASED, &dev->flags)); + + spin_lock_irqsave(&dev->port.lock, flags); +- if (dev->port.count > 0) { ++ if (atomic_read(&dev->port.count) > 0) { + spin_unlock_irqrestore(&dev->port.lock, flags); + return; + } +@@ -664,10 +664,10 @@ + return -ENODEV; + + BT_DBG("dev %p dst %pMR channel %d opened %d", dev, &dev->dst, +- dev->channel, dev->port.count); ++ dev->channel, atomic_read(&dev->port.count)); + + spin_lock_irqsave(&dev->port.lock, flags); +- if (++dev->port.count > 1) { ++ if (atomic_inc_return(&dev->port.count) > 1) { + spin_unlock_irqrestore(&dev->port.lock, flags); + return 0; + } +@@ -736,10 +736,10 @@ + return; + + BT_DBG("tty %p dev %p dlc %p opened %d", tty, dev, dev->dlc, +- dev->port.count); ++ atomic_read(&dev->port.count)); + + spin_lock_irqsave(&dev->port.lock, flags); +- if (!--dev->port.count) { ++ if (!atomic_dec_return(&dev->port.count)) { + spin_unlock_irqrestore(&dev->port.lock, flags); + if (dev->tty_dev->parent) + #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29)) |