diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-07-30 01:33:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-30 12:41:45 -0400 |
commit | 8f3d137e0d6cd470a4e404cbc67480a0febdb0b1 (patch) | |
tree | ec53b6c315ccc004f1fab662aee2e52d4579ffde /drivers/char/mxser.c | |
parent | bd673c7c3b1681dbfabab0062e67398dadf806af (diff) |
Char: mxser, ratelimit ioctl warning
The GET_MAJOR ioctl prints out a warning, make it ratelimited.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/mxser.c')
-rw-r--r-- | drivers/char/mxser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index e30575e87648..b638403e8e9c 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -1612,8 +1612,10 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp) | |||
1612 | 1612 | ||
1613 | switch (cmd) { | 1613 | switch (cmd) { |
1614 | case MOXA_GET_MAJOR: | 1614 | case MOXA_GET_MAJOR: |
1615 | printk(KERN_WARNING "mxser: '%s' uses deprecated ioctl %x, fix " | 1615 | if (printk_ratelimit()) |
1616 | "your userspace\n", current->comm, cmd); | 1616 | printk(KERN_WARNING "mxser: '%s' uses deprecated ioctl " |
1617 | "%x (GET_MAJOR), fix your userspace\n", | ||
1618 | current->comm, cmd); | ||
1617 | return put_user(ttymajor, (int __user *)argp); | 1619 | return put_user(ttymajor, (int __user *)argp); |
1618 | 1620 | ||
1619 | case MOXA_CHKPORTENABLE: | 1621 | case MOXA_CHKPORTENABLE: |