Input: bcm5974 - Driver cleanup by replacing dprintk with dev_dbg
Subsystems (3)
PATCH v2 1/1 Input: bcm5974 - Driver cleanup by replacing dprintk with dev_dbg
From: bhanuseshukumar <[email protected]>
Debug printk messages are converted to dev_dbg based logs for better control over debug messages using dynamic logging.
---
Changes in V2
1. Removed unnecessary module name(bcm5974) prefix in each dev_dbg logs.
2. Removed unwanted variable declarations as pointed out in v1 review
3. Name is used in signed-off tag instead of email alias.
Note: This patch is tested for compilation.
v1 patch : https://lore.kernel.org/all/[email protected]/
drivers/input/mouse/bcm5974.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
drivers/input/mouse/bcm5974.c +5 -13
@@ -156,13 +156,6 @@ MODULE_AUTHOR("Henrik Rydberg");MODULE_DESCRIPTION ("Apple USB BCM5974 multitouch driver" );MODULE_LICENSE ("GPL" ); -#define dprintk(level, format, a...)\ - { if (debug >= level) printk(KERN_DEBUG format, ##a); } - -static int debug =1 ; -module_param (debug, int,0644 ); -MODULE_PARM_DESC (debug,"Activate debugging output" ); -/* button data structure */ struct bt_data {u8 unknown1;/* constant */
@@ -550,8 +543,7 @@ static int report_bt_state(struct bcm5974 *dev, int size)if (size !=sizeof (struct bt_data ))return -EIO ; -dprintk (7 , -"bcm5974: button data: %x %x %x %x\n" , +dev_dbg (&dev->intf->dev,"button data: %x %x %x %x\n" , dev->bt_data->unknown1, dev->bt_data->button, dev->bt_data->rel_x, dev->bt_data->rel_y);
@@ -688,7 +680,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) goto out; } -dprintk (2 ,"bcm5974: switched to %s mode.\n" , +dev_dbg (&dev->intf->dev,"switched to %s mode.\n" , on ?"wellspring" :"normal" ); out:
@@ -718,7 +710,7 @@ static void bcm5974_irq_button(struct urb *urb) }if (report_bt_state (dev, dev->bt_urb->actual_length)) -dprintk (1 ,"bcm5974: bad button package, length: %d\n" , +dev_dbg (&intf->dev,"bad button package, length: %d\n" , dev->bt_urb->actual_length); exit:
@@ -753,7 +745,7 @@ static void bcm5974_irq_trackpad(struct urb *urb) goto exit;if (report_tp_state (dev, dev->tp_urb->actual_length)) -dprintk (1 ,"bcm5974: bad trackpad package, length: %d\n" , +dev_dbg (&intf->dev,"bad trackpad package, length: %d\n" , dev->tp_urb->actual_length); exit:
@@ -786,7 +778,7 @@ static int bcm5974_start_traffic(struct bcm5974 *dev) error =bcm5974_wellspring_mode (dev, true);if (error) { -dprintk (1 ,"bcm5974: mode switch failed\n" ); +dev_dbg (&dev->intf->dev,"mode switch failed\n" ); goto err_out; }
Signature · 1 line
2.34.1
Quoted 6 lines · Bhanu Seshu Kumar Valluri
From: bhanuseshukumar <[email protected]>
Debug printk messages are converted to
dev_dbgbased logs for better control over debug messages using dynamic logging.Signed-off-by Bhanu Seshu Kumar Valluri <[email protected]>
Does not match your "From:" line :(