Commit e037f95f authored by Matwey V. Kornilov's avatar Matwey V. Kornilov Committed by Greg Kroah-Hartman

tty: mxser: Fix build warning introduced by dfc7b837 (Re: linux-next:...

tty: mxser: Fix build warning introduced by dfc7b837 (Re: linux-next: build warning after merge of the tty.current tree)

Fix build warning at mxser.c introduced by dfc7b837 (tty: mxser: fix
usage of opmode_ioaddr)
Signed-off-by: default avatarMatwey V. Kornilov <matwey@sai.msu.ru>
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dfc7b837
...@@ -1674,15 +1674,15 @@ static int mxser_ioctl(struct tty_struct *tty, ...@@ -1674,15 +1674,15 @@ static int mxser_ioctl(struct tty_struct *tty,
return mxser_ioctl_special(cmd, argp); return mxser_ioctl_special(cmd, argp);
if (cmd == MOXA_SET_OP_MODE || cmd == MOXA_GET_OP_MODE) { if (cmd == MOXA_SET_OP_MODE || cmd == MOXA_GET_OP_MODE) {
if (info->board->chip_flag != MOXA_MUST_MU860_HWID)
return -EFAULT;
int p; int p;
unsigned long opmode; unsigned long opmode;
static unsigned char ModeMask[] = { 0xfc, 0xf3, 0xcf, 0x3f }; static unsigned char ModeMask[] = { 0xfc, 0xf3, 0xcf, 0x3f };
int shiftbit; int shiftbit;
unsigned char val, mask; unsigned char val, mask;
if (info->board->chip_flag != MOXA_MUST_MU860_HWID)
return -EFAULT;
p = tty->index % 4; p = tty->index % 4;
if (cmd == MOXA_SET_OP_MODE) { if (cmd == MOXA_SET_OP_MODE) {
if (get_user(opmode, (int __user *) argp)) if (get_user(opmode, (int __user *) argp))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment