Skip to content

Commit b05cec6

Browse files
RishiGupta12Jiri Kosina
authored andcommitted
HID: hidraw: replace printk() with corresponding pr_xx() variant
This commit replaces direct invocations of printk with their appropriate pr_info/warn() variant. Signed-off-by: Rishi Gupta <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 1ad0bc7 commit b05cec6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/hid/hidraw.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,15 @@ static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t
197197
}
198198

199199
if (count > HID_MAX_BUFFER_SIZE) {
200-
printk(KERN_WARNING "hidraw: pid %d passed too large report\n",
201-
task_pid_nr(current));
200+
hid_warn(dev, "pid %d passed too large report\n",
201+
task_pid_nr(current));
202202
ret = -EINVAL;
203203
goto out;
204204
}
205205

206206
if (count < 2) {
207-
printk(KERN_WARNING "hidraw: pid %d passed too short report\n",
208-
task_pid_nr(current));
207+
hid_warn(dev, "pid %d passed too short report\n",
208+
task_pid_nr(current));
209209
ret = -EINVAL;
210210
goto out;
211211
}
@@ -597,7 +597,7 @@ int __init hidraw_init(void)
597597
if (result < 0)
598598
goto error_class;
599599

600-
printk(KERN_INFO "hidraw: raw HID events driver (C) Jiri Kosina\n");
600+
pr_info("raw HID events driver (C) Jiri Kosina\n");
601601
out:
602602
return result;
603603

0 commit comments

Comments
 (0)