Skip to content

Commit 2afebaf

Browse files
Oliver Neukumdtor
authored andcommitted
Input: ff-core - use new debug macros
Replace old pr_* with dev_* debugging macros Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 8b8be51 commit 2afebaf

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎drivers/input/ff-core.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323

2424
/* #define DEBUG */
2525

26-
#define pr_fmt(fmt) KBUILD_BASENAME ": " fmt
27-
2826
#include <linux/input.h>
2927
#include <linux/module.h>
3028
#include <linux/mutex.h>
@@ -116,15 +114,15 @@ int input_ff_upload(struct input_dev *dev, struct ff_effect *effect,
116114

117115
if (effect->type < FF_EFFECT_MIN || effect->type > FF_EFFECT_MAX ||
118116
!test_bit(effect->type, dev->ffbit)) {
119-
pr_debug("invalid or not supported effect type in upload\n");
117+
dev_dbg(&dev->dev, "invalid or not supported effect type in upload\n");
120118
return -EINVAL;
121119
}
122120

123121
if (effect->type == FF_PERIODIC &&
124122
(effect->u.periodic.waveform < FF_WAVEFORM_MIN ||
125123
effect->u.periodic.waveform > FF_WAVEFORM_MAX ||
126124
!test_bit(effect->u.periodic.waveform, dev->ffbit))) {
127-
pr_debug("invalid or not supported wave form in upload\n");
125+
dev_dbg(&dev->dev, "invalid or not supported wave form in upload\n");
128126
return -EINVAL;
129127
}
130128

@@ -246,7 +244,7 @@ static int flush_effects(struct input_dev *dev, struct file *file)
246244
struct ff_device *ff = dev->ff;
247245
int i;
248246

249-
pr_debug("flushing now\n");
247+
dev_dbg(&dev->dev, "flushing now\n");
250248

251249
mutex_lock(&ff->mutex);
252250

@@ -316,7 +314,7 @@ int input_ff_create(struct input_dev *dev, unsigned int max_effects)
316314
int i;
317315

318316
if (!max_effects) {
319-
pr_err("cannot allocate device without any effects\n");
317+
dev_err(&dev->dev, "cannot allocate device without any effects\n");
320318
return -EINVAL;
321319
}
322320

0 commit comments

Comments
 (0)