summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Dietrich <christian.dietrich@informatik.uni-erlangen.de>2011-06-04 17:36:43 +0200
committerDave Airlie <airlied@redhat.com>2011-06-16 08:32:15 +0200
commitcafe8d8413399119c3f4cd575e0eb27e2654b9d5 (patch)
treeae2584fb232db4af39568875bae64145fd1c2122
parentdrm/radeon: workaround a hw bug on some radeon chipsets with all-0 EDIDs. (diff)
downloadlinux-cafe8d8413399119c3f4cd575e0eb27e2654b9d5.tar.xz
linux-cafe8d8413399119c3f4cd575e0eb27e2654b9d5.zip
drivers/gpu/drm: use printk_ratelimited instead of printk_ratelimit
Since printk_ratelimit() shouldn't be used anymore (see comment in include/linux/printk.h), replace it with printk_ratelimited. Signed-off-by: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_ioc32.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index d61d185cf040..4a058c7af6c0 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -28,6 +28,7 @@
* IN THE SOFTWARE.
*/
#include <linux/compat.h>
+#include <linux/ratelimit.h>
#include "drmP.h"
#include "drm_core.h"
@@ -253,10 +254,10 @@ static int compat_drm_addmap(struct file *file, unsigned int cmd,
return -EFAULT;
m32.handle = (unsigned long)handle;
- if (m32.handle != (unsigned long)handle && printk_ratelimit())
- printk(KERN_ERR "compat_drm_addmap truncated handle"
- " %p for type %d offset %x\n",
- handle, m32.type, m32.offset);
+ if (m32.handle != (unsigned long)handle)
+ printk_ratelimited(KERN_ERR "compat_drm_addmap truncated handle"
+ " %p for type %d offset %x\n",
+ handle, m32.type, m32.offset);
if (copy_to_user(argp, &m32, sizeof(m32)))
return -EFAULT;