aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/istallion.c
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-07-21 05:48:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-21 12:39:15 -0400
commit42a77a1b8fe4fd78cf8d8fccbaac918bbe888192 (patch)
treeab5d01e1c9dbb4612321c03c0482563f4fb68687 /drivers/char/istallion.c
parent14b395e35d1afdd8019d11b92e28041fad591b71 (diff)
Fix istallion build failure
Commits b02f5ad6a3ff5a1ee2a7b8ec6eee338de553b060 ("istallion: use tty_port") and a352def21a642133758b868c71bee12ab34ad5c5 ("tty: Ldisc revamp") broke the istallion driver. Fix the compile error and silence a warning. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/istallion.c')
-rw-r--r--drivers/char/istallion.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 6ef1c565705c..7930fba4bafc 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -598,7 +598,7 @@ static int stli_parsebrd(struct stlconf *confp, char **argp);
598static int stli_open(struct tty_struct *tty, struct file *filp); 598static int stli_open(struct tty_struct *tty, struct file *filp);
599static void stli_close(struct tty_struct *tty, struct file *filp); 599static void stli_close(struct tty_struct *tty, struct file *filp);
600static int stli_write(struct tty_struct *tty, const unsigned char *buf, int count); 600static int stli_write(struct tty_struct *tty, const unsigned char *buf, int count);
601static void stli_putchar(struct tty_struct *tty, unsigned char ch); 601static int stli_putchar(struct tty_struct *tty, unsigned char ch);
602static void stli_flushchars(struct tty_struct *tty); 602static void stli_flushchars(struct tty_struct *tty);
603static int stli_writeroom(struct tty_struct *tty); 603static int stli_writeroom(struct tty_struct *tty);
604static int stli_charsinbuffer(struct tty_struct *tty); 604static int stli_charsinbuffer(struct tty_struct *tty);
@@ -826,7 +826,7 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
826 */ 826 */
827 portp->port.tty = tty; 827 portp->port.tty = tty;
828 tty->driver_data = portp; 828 tty->driver_data = portp;
829 portp->refcount++; 829 portp->port.count++;
830 830
831 wait_event_interruptible(portp->raw_wait, 831 wait_event_interruptible(portp->raw_wait,
832 !test_bit(ST_INITIALIZING, &portp->state)); 832 !test_bit(ST_INITIALIZING, &portp->state));
@@ -888,9 +888,9 @@ static void stli_close(struct tty_struct *tty, struct file *filp)
888 spin_unlock_irqrestore(&stli_lock, flags); 888 spin_unlock_irqrestore(&stli_lock, flags);
889 return; 889 return;
890 } 890 }
891 if ((tty->count == 1) && (portp->refcount != 1)) 891 if ((tty->count == 1) && (portp->port.count != 1))
892 portp->refcount = 1; 892 portp->port.count = 1;
893 if (portp->refcount-- > 1) { 893 if (portp->port.count-- > 1) {
894 spin_unlock_irqrestore(&stli_lock, flags); 894 spin_unlock_irqrestore(&stli_lock, flags);
895 return; 895 return;
896 } 896 }
@@ -925,8 +925,8 @@ static void stli_close(struct tty_struct *tty, struct file *filp)
925 clear_bit(ST_TXBUSY, &portp->state); 925 clear_bit(ST_TXBUSY, &portp->state);
926 clear_bit(ST_RXSTOP, &portp->state); 926 clear_bit(ST_RXSTOP, &portp->state);
927 set_bit(TTY_IO_ERROR, &tty->flags); 927 set_bit(TTY_IO_ERROR, &tty->flags);
928 if (tty->ldisc.flush_buffer) 928 if (tty->ldisc.ops->flush_buffer)
929 (tty->ldisc.flush_buffer)(tty); 929 (tty->ldisc.ops->flush_buffer)(tty);
930 set_bit(ST_DOFLUSHRX, &portp->state); 930 set_bit(ST_DOFLUSHRX, &portp->state);
931 stli_flushbuffer(tty); 931 stli_flushbuffer(tty);
932 932
@@ -1202,7 +1202,7 @@ static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct
1202 spin_lock_irqsave(&stli_lock, flags); 1202 spin_lock_irqsave(&stli_lock, flags);
1203 portp->openwaitcnt++; 1203 portp->openwaitcnt++;
1204 if (! tty_hung_up_p(filp)) 1204 if (! tty_hung_up_p(filp))
1205 portp->refcount--; 1205 portp->port.count--;
1206 spin_unlock_irqrestore(&stli_lock, flags); 1206 spin_unlock_irqrestore(&stli_lock, flags);
1207 1207
1208 for (;;) { 1208 for (;;) {
@@ -1231,7 +1231,7 @@ static int stli_waitcarrier(struct stlibrd *brdp, struct stliport *portp, struct
1231 1231
1232 spin_lock_irqsave(&stli_lock, flags); 1232 spin_lock_irqsave(&stli_lock, flags);
1233 if (! tty_hung_up_p(filp)) 1233 if (! tty_hung_up_p(filp))
1234 portp->refcount++; 1234 portp->port.count++;
1235 portp->openwaitcnt--; 1235 portp->openwaitcnt--;
1236 spin_unlock_irqrestore(&stli_lock, flags); 1236 spin_unlock_irqrestore(&stli_lock, flags);
1237 1237
@@ -1333,7 +1333,7 @@ static int stli_write(struct tty_struct *tty, const unsigned char *buf, int coun
1333 * first them do the new ports. 1333 * first them do the new ports.
1334 */ 1334 */
1335 1335
1336static void stli_putchar(struct tty_struct *tty, unsigned char ch) 1336static int stli_putchar(struct tty_struct *tty, unsigned char ch)
1337{ 1337{
1338 if (tty != stli_txcooktty) { 1338 if (tty != stli_txcooktty) {
1339 if (stli_txcooktty != NULL) 1339 if (stli_txcooktty != NULL)
@@ -1342,6 +1342,7 @@ static void stli_putchar(struct tty_struct *tty, unsigned char ch)
1342 } 1342 }
1343 1343
1344 stli_txcookbuf[stli_txcooksize++] = ch; 1344 stli_txcookbuf[stli_txcooksize++] = ch;
1345 return 0;
1345} 1346}
1346 1347
1347/*****************************************************************************/ 1348/*****************************************************************************/
@@ -1660,7 +1661,6 @@ static int stli_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm
1660{ 1661{
1661 struct stliport *portp; 1662 struct stliport *portp;
1662 struct stlibrd *brdp; 1663 struct stlibrd *brdp;
1663 unsigned int ival;
1664 int rc; 1664 int rc;
1665 void __user *argp = (void __user *)arg; 1665 void __user *argp = (void __user *)arg;
1666 1666
@@ -1857,7 +1857,7 @@ static void stli_hangup(struct tty_struct *tty)
1857 set_bit(TTY_IO_ERROR, &tty->flags); 1857 set_bit(TTY_IO_ERROR, &tty->flags);
1858 portp->port.tty = NULL; 1858 portp->port.tty = NULL;
1859 portp->port.flags &= ~ASYNC_NORMAL_ACTIVE; 1859 portp->port.flags &= ~ASYNC_NORMAL_ACTIVE;
1860 portp->refcount = 0; 1860 portp->port.count = 0;
1861 spin_unlock_irqrestore(&stli_lock, flags); 1861 spin_unlock_irqrestore(&stli_lock, flags);
1862 1862
1863 wake_up_interruptible(&portp->port.open_wait); 1863 wake_up_interruptible(&portp->port.open_wait);
@@ -4246,7 +4246,7 @@ static int stli_portcmdstats(struct stliport *portp)
4246 stli_comstats.panel = portp->panelnr; 4246 stli_comstats.panel = portp->panelnr;
4247 stli_comstats.port = portp->portnr; 4247 stli_comstats.port = portp->portnr;
4248 stli_comstats.state = portp->state; 4248 stli_comstats.state = portp->state;
4249 stli_comstats.flags = portp->port.flag; 4249 stli_comstats.flags = portp->port.flags;
4250 4250
4251 spin_lock_irqsave(&brd_lock, flags); 4251 spin_lock_irqsave(&brd_lock, flags);
4252 if (portp->port.tty != NULL) { 4252 if (portp->port.tty != NULL) {