aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/sx.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-06-01 16:53:01 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-10 16:47:43 -0400
commitec79d6056de58511d8e46d9ae59d3878f958dc3e (patch)
tree8e73cf399c4cb3c31dbf3caced385cfc018a706a /drivers/char/sx.c
parent3f582b8c11014e4ce310d9839fb335164195333f (diff)
tty: replace BKL with a new tty_lock
As a preparation for replacing the big kernel lock in the TTY layer, wrap all the callers in new macros tty_lock, tty_lock_nested and tty_unlock. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/sx.c')
-rw-r--r--drivers/char/sx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/sx.c b/drivers/char/sx.c
index a81ec4fcf6ff..5b24db4ff7f1 100644
--- a/drivers/char/sx.c
+++ b/drivers/char/sx.c
@@ -1699,7 +1699,7 @@ static long sx_fw_ioctl(struct file *filp, unsigned int cmd,
1699 if (!capable(CAP_SYS_RAWIO)) 1699 if (!capable(CAP_SYS_RAWIO))
1700 return -EPERM; 1700 return -EPERM;
1701 1701
1702 lock_kernel(); 1702 tty_lock();
1703 1703
1704 sx_dprintk(SX_DEBUG_FIRMWARE, "IOCTL %x: %lx\n", cmd, arg); 1704 sx_dprintk(SX_DEBUG_FIRMWARE, "IOCTL %x: %lx\n", cmd, arg);
1705 1705
@@ -1848,7 +1848,7 @@ static long sx_fw_ioctl(struct file *filp, unsigned int cmd,
1848 break; 1848 break;
1849 } 1849 }
1850out: 1850out:
1851 unlock_kernel(); 1851 tty_unlock();
1852 func_exit(); 1852 func_exit();
1853 return rc; 1853 return rc;
1854} 1854}
@@ -1859,7 +1859,7 @@ static int sx_break(struct tty_struct *tty, int flag)
1859 int rv; 1859 int rv;
1860 1860
1861 func_enter(); 1861 func_enter();
1862 lock_kernel(); 1862 tty_lock();
1863 1863
1864 if (flag) 1864 if (flag)
1865 rv = sx_send_command(port, HS_START, -1, HS_IDLE_BREAK); 1865 rv = sx_send_command(port, HS_START, -1, HS_IDLE_BREAK);
@@ -1868,7 +1868,7 @@ static int sx_break(struct tty_struct *tty, int flag)
1868 if (rv != 1) 1868 if (rv != 1)
1869 printk(KERN_ERR "sx: couldn't send break (%x).\n", 1869 printk(KERN_ERR "sx: couldn't send break (%x).\n",
1870 read_sx_byte(port->board, CHAN_OFFSET(port, hi_hstat))); 1870 read_sx_byte(port->board, CHAN_OFFSET(port, hi_hstat)));
1871 unlock_kernel(); 1871 tty_unlock();
1872 func_exit(); 1872 func_exit();
1873 return 0; 1873 return 0;
1874} 1874}
@@ -1909,7 +1909,7 @@ static int sx_ioctl(struct tty_struct *tty, struct file *filp,
1909 /* func_enter2(); */ 1909 /* func_enter2(); */
1910 1910
1911 rc = 0; 1911 rc = 0;
1912 lock_kernel(); 1912 tty_lock();
1913 switch (cmd) { 1913 switch (cmd) {
1914 case TIOCGSERIAL: 1914 case TIOCGSERIAL:
1915 rc = gs_getserial(&port->gs, argp); 1915 rc = gs_getserial(&port->gs, argp);
@@ -1921,7 +1921,7 @@ static int sx_ioctl(struct tty_struct *tty, struct file *filp,
1921 rc = -ENOIOCTLCMD; 1921 rc = -ENOIOCTLCMD;
1922 break; 1922 break;
1923 } 1923 }
1924 unlock_kernel(); 1924 tty_unlock();
1925 1925
1926 /* func_exit(); */ 1926 /* func_exit(); */
1927 return rc; 1927 return rc;