summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2021-07-04 23:09:07 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2021-07-04 23:09:05 -0700
commit648e05fbb2a696d931d1f206b17d0c8d4b34781f (patch)
treec99616879044252a63e6c8c517a29db2ee8fb79a
parentb6e4686fb49d02526358d39737549686850e85ae (diff)
parentf363c474b5f0006e760ef277369fbbb52c34f781 (diff)
Merge "HID: make arrays usage and value to be the same"
-rw-r--r--drivers/hid/hid-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 6e1791308c56..4cb486fe465d 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -91,7 +91,7 @@ EXPORT_SYMBOL_GPL(hid_register_report);
* Register a new field for this report.
*/
-static struct hid_field *hid_register_field(struct hid_report *report, unsigned usages, unsigned values)
+static struct hid_field *hid_register_field(struct hid_report *report, unsigned usages)
{
struct hid_field *field;
@@ -102,7 +102,7 @@ static struct hid_field *hid_register_field(struct hid_report *report, unsigned
field = kzalloc((sizeof(struct hid_field) +
usages * sizeof(struct hid_usage) +
- values * sizeof(unsigned)), GFP_KERNEL);
+ usages * sizeof(unsigned)), GFP_KERNEL);
if (!field)
return NULL;
@@ -263,7 +263,7 @@ static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsign
usages = max_t(unsigned, parser->local.usage_index,
parser->global.report_count);
- field = hid_register_field(report, usages, parser->global.report_count);
+ field = hid_register_field(report, usages);
if (!field)
return 0;