]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
HID: pl: eliminate private debug macro
authorOliver Neukum <oneukum@suse.com>
Tue, 3 Mar 2026 08:43:38 +0000 (09:43 +0100)
committerJiri Kosina <jkosina@suse.com>
Thu, 12 Mar 2026 13:20:57 +0000 (14:20 +0100)
Use proper dynamic debugging.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-pl.c

index c6c2961dd574159f5af51f8d92f81e055fa7658a..8bba29ef6c7a8daa26862b7e066c1dc5d0e3a61c 100644 (file)
  */
 
 
-/* #define DEBUG */
-
-#define debug(format, arg...) pr_debug("hid-plff: " format "\n" , ## arg)
-
 #include <linux/input.h>
 #include <linux/slab.h>
 #include <linux/module.h>
@@ -53,14 +49,14 @@ static int hid_plff_play(struct input_dev *dev, void *data,
 
        left = effect->u.rumble.strong_magnitude;
        right = effect->u.rumble.weak_magnitude;
-       debug("called with 0x%04x 0x%04x", left, right);
+       hid_dbg(dev, "called with 0x%04x 0x%04x", left, right);
 
        left = left * plff->maxval / 0xffff;
        right = right * plff->maxval / 0xffff;
 
        *plff->strong = left;
        *plff->weak = right;
-       debug("running with 0x%02x 0x%02x", left, right);
+       hid_dbg(dev, "running with 0x%02x 0x%02x", left, right);
        hid_hw_request(hid, plff->report, HID_REQ_SET_REPORT);
 
        return 0;
@@ -119,7 +115,7 @@ static int plff_init(struct hid_device *hid)
                        report->field[0]->value[1] = 0x00;
                        strong = &report->field[0]->value[2];
                        weak = &report->field[0]->value[3];
-                       debug("detected single-field device");
+                       hid_dbg(hid, "detected single-field device");
                } else if (report->field[0]->maxusage == 1 &&
                           report->field[0]->usage[0].hid ==
                                (HID_UP_LED | 0x43) &&
@@ -134,7 +130,7 @@ static int plff_init(struct hid_device *hid)
                        weak = &report->field[3]->value[0];
                        if (hid->vendor == USB_VENDOR_ID_JESS2)
                                maxval = 0xff;
-                       debug("detected 4-field device");
+                       hid_dbg(hid, "detected 4-field device");
                } else {
                        hid_err(hid, "not enough fields or values\n");
                        return -ENODEV;