Skip to content

Commit 56e139f

Browse files
Jesper JuhlLinus Torvalds
authored andcommitted
[PATCH] moxa: remove pointless casts
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent d2e5b13 commit 56e139f

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

‎drivers/char/mxser.c‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ static int mxser_init(void)
877877

878878
static void mxser_do_softint(void *private_)
879879
{
880-
struct mxser_struct *info = (struct mxser_struct *) private_;
880+
struct mxser_struct *info = private_;
881881
struct tty_struct *tty;
882882

883883
tty = info->tty;
@@ -972,7 +972,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
972972
*/
973973
static void mxser_close(struct tty_struct *tty, struct file *filp)
974974
{
975-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
975+
struct mxser_struct *info = tty->driver_data;
976976

977977
unsigned long timeout;
978978
unsigned long flags;
@@ -1078,7 +1078,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
10781078
static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int count)
10791079
{
10801080
int c, total = 0;
1081-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1081+
struct mxser_struct *info = tty->driver_data;
10821082
unsigned long flags;
10831083

10841084
if (!tty || !info->xmit_buf)
@@ -1114,7 +1114,7 @@ static int mxser_write(struct tty_struct *tty, const unsigned char *buf, int cou
11141114

11151115
static void mxser_put_char(struct tty_struct *tty, unsigned char ch)
11161116
{
1117-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1117+
struct mxser_struct *info = tty->driver_data;
11181118
unsigned long flags;
11191119

11201120
if (!tty || !info->xmit_buf)
@@ -1141,7 +1141,7 @@ static void mxser_put_char(struct tty_struct *tty, unsigned char ch)
11411141

11421142
static void mxser_flush_chars(struct tty_struct *tty)
11431143
{
1144-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1144+
struct mxser_struct *info = tty->driver_data;
11451145
unsigned long flags;
11461146

11471147
if (info->xmit_cnt <= 0 || tty->stopped || !info->xmit_buf || (tty->hw_stopped && (info->type != PORT_16550A) && (!info->IsMoxaMustChipFlag)))
@@ -1157,7 +1157,7 @@ static void mxser_flush_chars(struct tty_struct *tty)
11571157

11581158
static int mxser_write_room(struct tty_struct *tty)
11591159
{
1160-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1160+
struct mxser_struct *info = tty->driver_data;
11611161
int ret;
11621162

11631163
ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
@@ -1168,13 +1168,13 @@ static int mxser_write_room(struct tty_struct *tty)
11681168

11691169
static int mxser_chars_in_buffer(struct tty_struct *tty)
11701170
{
1171-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1171+
struct mxser_struct *info = tty->driver_data;
11721172
return info->xmit_cnt;
11731173
}
11741174

11751175
static void mxser_flush_buffer(struct tty_struct *tty)
11761176
{
1177-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1177+
struct mxser_struct *info = tty->driver_data;
11781178
char fcr;
11791179
unsigned long flags;
11801180

@@ -1197,7 +1197,7 @@ static void mxser_flush_buffer(struct tty_struct *tty)
11971197

11981198
static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)
11991199
{
1200-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1200+
struct mxser_struct *info = tty->driver_data;
12011201
int retval;
12021202
struct async_icount cprev, cnow; /* kernel counter temps */
12031203
struct serial_icounter_struct __user *p_cuser;
@@ -1581,7 +1581,7 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp)
15811581

15821582
static void mxser_stoprx(struct tty_struct *tty)
15831583
{
1584-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1584+
struct mxser_struct *info = tty->driver_data;
15851585
//unsigned long flags;
15861586

15871587

@@ -1615,7 +1615,7 @@ static void mxser_stoprx(struct tty_struct *tty)
16151615

16161616
static void mxser_startrx(struct tty_struct *tty)
16171617
{
1618-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1618+
struct mxser_struct *info = tty->driver_data;
16191619
//unsigned long flags;
16201620

16211621
info->ldisc_stop_rx = 0;
@@ -1656,7 +1656,7 @@ static void mxser_startrx(struct tty_struct *tty)
16561656
*/
16571657
static void mxser_throttle(struct tty_struct *tty)
16581658
{
1659-
//struct mxser_struct *info = (struct mxser_struct *)tty->driver_data;
1659+
//struct mxser_struct *info = tty->driver_data;
16601660
//unsigned long flags;
16611661
//MX_LOCK(&info->slock);
16621662
mxser_stoprx(tty);
@@ -1665,7 +1665,7 @@ static void mxser_throttle(struct tty_struct *tty)
16651665

16661666
static void mxser_unthrottle(struct tty_struct *tty)
16671667
{
1668-
//struct mxser_struct *info = (struct mxser_struct *)tty->driver_data;
1668+
//struct mxser_struct *info = tty->driver_data;
16691669
//unsigned long flags;
16701670
//MX_LOCK(&info->slock);
16711671
mxser_startrx(tty);
@@ -1674,7 +1674,7 @@ static void mxser_unthrottle(struct tty_struct *tty)
16741674

16751675
static void mxser_set_termios(struct tty_struct *tty, struct termios *old_termios)
16761676
{
1677-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1677+
struct mxser_struct *info = tty->driver_data;
16781678
unsigned long flags;
16791679

16801680
if ((tty->termios->c_cflag != old_termios->c_cflag) || (RELEVANT_IFLAG(tty->termios->c_iflag) != RELEVANT_IFLAG(old_termios->c_iflag))) {
@@ -1711,7 +1711,7 @@ static void mxser_set_termios(struct tty_struct *tty, struct termios *old_termio
17111711
*/
17121712
static void mxser_stop(struct tty_struct *tty)
17131713
{
1714-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1714+
struct mxser_struct *info = tty->driver_data;
17151715
unsigned long flags;
17161716

17171717
spin_lock_irqsave(&info->slock, flags);
@@ -1724,7 +1724,7 @@ static void mxser_stop(struct tty_struct *tty)
17241724

17251725
static void mxser_start(struct tty_struct *tty)
17261726
{
1727-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1727+
struct mxser_struct *info = tty->driver_data;
17281728
unsigned long flags;
17291729

17301730
spin_lock_irqsave(&info->slock, flags);
@@ -1740,7 +1740,7 @@ static void mxser_start(struct tty_struct *tty)
17401740
*/
17411741
static void mxser_wait_until_sent(struct tty_struct *tty, int timeout)
17421742
{
1743-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1743+
struct mxser_struct *info = tty->driver_data;
17441744
unsigned long orig_jiffies, char_time;
17451745
int lsr;
17461746

@@ -1803,7 +1803,7 @@ static void mxser_wait_until_sent(struct tty_struct *tty, int timeout)
18031803
*/
18041804
void mxser_hangup(struct tty_struct *tty)
18051805
{
1806-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1806+
struct mxser_struct *info = tty->driver_data;
18071807

18081808
mxser_flush_buffer(tty);
18091809
mxser_shutdown(info);
@@ -1821,7 +1821,7 @@ void mxser_hangup(struct tty_struct *tty)
18211821
*/
18221822
static void mxser_rs_break(struct tty_struct *tty, int break_state)
18231823
{
1824-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
1824+
struct mxser_struct *info = tty->driver_data;
18251825
unsigned long flags;
18261826

18271827
spin_lock_irqsave(&info->slock, flags);
@@ -2886,7 +2886,7 @@ static void mxser_send_break(struct mxser_struct *info, int duration)
28862886

28872887
static int mxser_tiocmget(struct tty_struct *tty, struct file *file)
28882888
{
2889-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
2889+
struct mxser_struct *info = tty->driver_data;
28902890
unsigned char control, status;
28912891
unsigned long flags;
28922892

@@ -2909,7 +2909,7 @@ static int mxser_tiocmget(struct tty_struct *tty, struct file *file)
29092909

29102910
static int mxser_tiocmset(struct tty_struct *tty, struct file *file, unsigned int set, unsigned int clear)
29112911
{
2912-
struct mxser_struct *info = (struct mxser_struct *) tty->driver_data;
2912+
struct mxser_struct *info = tty->driver_data;
29132913
unsigned long flags;
29142914

29152915

0 commit comments

Comments
 (0)