From: Jiri Slaby Date: Wed, 30 Jul 2008 05:33:38 +0000 (-0700) Subject: Char: mxser, ratelimit ioctl warning X-Git-Tag: v2.6.27-rc2~178 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8f3d137e0d6cd470a4e404cbc67480a0febdb0b1;p=linux-2.6-omap-h63xx.git Char: mxser, ratelimit ioctl warning The GET_MAJOR ioctl prints out a warning, make it ratelimited. Signed-off-by: Jiri Slaby Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index e30575e8764..b638403e8e9 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) switch (cmd) { case MOXA_GET_MAJOR: - printk(KERN_WARNING "mxser: '%s' uses deprecated ioctl %x, fix " - "your userspace\n", current->comm, cmd); + if (printk_ratelimit()) + printk(KERN_WARNING "mxser: '%s' uses deprecated ioctl " + "%x (GET_MAJOR), fix your userspace\n", + current->comm, cmd); return put_user(ttymajor, (int __user *)argp); case MOXA_CHKPORTENABLE: