From: Oliver Neukum <oneukum@suse.com>
To: jikos@kernel.org, bentiss@kernel.org, linux-input@vger.kernel.org
Cc: Oliver Neukum <oneukum@suse.com>
Subject: [PATCH 2/2] hid: hid-pl: eliminate private debug macro
Date: Mon, 16 Feb 2026 14:44:01 +0100 [thread overview]
Message-ID: <20260216134958.260648-3-oneukum@suse.com> (raw)
In-Reply-To: <20260216134958.260648-1-oneukum@suse.com>
Use proper dynamic debugging.
V2: resend full series
Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
drivers/hid/hid-pl.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/hid/hid-pl.c b/drivers/hid/hid-pl.c
index dc11d5322fc0..4b6b33597d11 100644
--- a/drivers/hid/hid-pl.c
+++ b/drivers/hid/hid-pl.c
@@ -24,10 +24,6 @@
*/
-/* #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);
+ dev_dbg(&dev->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);
+ dev_dbg(&dev->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");
+ dev_dbg(&hid->dev, "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");
+ dev_dbg(&hid->dev, "detected 4-field device");
} else {
hid_err(hid, "not enough fields or values\n");
return -ENODEV;
--
2.53.0
next prev parent reply other threads:[~2026-02-16 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-16 13:43 [PATCHv2 0/2] hid: hid-pl.c update Oliver Neukum
2026-02-16 13:44 ` [PATCHv2 1/2] hid: hid-pl: handle probe errors Oliver Neukum
2026-02-26 15:06 ` Jiri Kosina
2026-02-16 13:44 ` Oliver Neukum [this message]
2026-02-26 15:07 ` [PATCH 2/2] hid: hid-pl: eliminate private debug macro Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260216134958.260648-3-oneukum@suse.com \
--to=oneukum@suse.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox