]> Git Repo - linux.git/commitdiff
Merge branch 'for-6.3/i2c-hid' into for-linus
authorBenjamin Tissoires <[email protected]>
Wed, 22 Feb 2023 09:34:51 +0000 (10:34 +0100)
committerBenjamin Tissoires <[email protected]>
Wed, 22 Feb 2023 09:34:51 +0000 (10:34 +0100)
- dev_dbg cleanup (Thomas Weißschuh)
- cleanup i2c-hid-acpi (Andy Shevchenko)
- goodix: revert/fixes for an actual production device compared to the
  manufacturer sample (Douglas Anderson)

1  2 
drivers/hid/i2c-hid/i2c-hid-core.c

index af98ac31c8d42f89f06ddc8f4d6c8b12af3f2fd1,c83c93716782b00c7f39409397c57386e6ea476f..0ab8f47a84e962eda6a0e12937d3a5dfe710263c
  #define I2C_HID_PWR_ON                0x00
  #define I2C_HID_PWR_SLEEP     0x01
  
- /* debug option */
- static bool debug;
- module_param(debug, bool, 0444);
- MODULE_PARM_DESC(debug, "print a lot of debug information");
- #define i2c_hid_dbg(ihid, fmt, arg...)                                          \
- do {                                                                    \
-       if (debug)                                                        \
-               dev_printk(KERN_DEBUG, &(ihid)->client->dev, fmt, ##arg); \
- } while (0)
+ #define i2c_hid_dbg(ihid, ...) dev_dbg(&(ihid)->client->dev, __VA_ARGS__)
  
  struct i2c_hid_desc {
        __le16 wHIDDescLength;
@@@ -842,7 -833,7 +833,7 @@@ static void i2c_hid_close(struct hid_de
        clear_bit(I2C_HID_STARTED, &ihid->flags);
  }
  
 -struct hid_ll_driver i2c_hid_ll_driver = {
 +static const struct hid_ll_driver i2c_hid_ll_driver = {
        .parse = i2c_hid_parse,
        .start = i2c_hid_start,
        .stop = i2c_hid_stop,
        .output_report = i2c_hid_output_report,
        .raw_request = i2c_hid_raw_request,
  };
 -EXPORT_SYMBOL_GPL(i2c_hid_ll_driver);
  
  static int i2c_hid_init_irq(struct i2c_client *client)
  {
        unsigned long irqflags = 0;
        int ret;
  
-       dev_dbg(&client->dev, "Requesting IRQ: %d\n", client->irq);
+       i2c_hid_dbg(ihid, "Requesting IRQ: %d\n", client->irq);
  
        if (!irq_get_trigger_type(client->irq))
                irqflags = IRQF_TRIGGER_LOW;
@@@ -1002,7 -994,7 +993,7 @@@ int i2c_hid_core_probe(struct i2c_clien
        /* Make sure there is something at this address */
        ret = i2c_smbus_read_byte(client);
        if (ret < 0) {
-               dev_dbg(&client->dev, "nothing at this address: %d\n", ret);
+               i2c_hid_dbg(ihid, "nothing at this address: %d\n", ret);
                ret = -ENXIO;
                goto err_powered;
        }
This page took 0.061195 seconds and 4 git commands to generate.