diff options
author | Nikolai Kondrashov <spbnick@gmail.com> | 2022-02-19 11:01:54 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-03-01 15:28:14 +0100 |
commit | 2e28f3e099f24bf976624baa1fe3a6ab90702406 (patch) | |
tree | f252d983fbf4b1e4a1e9b52b694a550c61c0a735 /drivers/hid/hid-uclogic-params.c | |
parent | HID: uclogic: Use different constants for frame report IDs (diff) | |
download | linux-2e28f3e099f24bf976624baa1fe3a6ab90702406.tar.xz linux-2e28f3e099f24bf976624baa1fe3a6ab90702406.zip |
HID: uclogic: Use "frame" instead of "buttonpad"
Use the term "frame" instead of "buttonpad" for consistency, in UC-Logic
driver.
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-uclogic-params.c')
-rw-r--r-- | drivers/hid/hid-uclogic-params.c | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c index a4a53ab1e72c..168749d9a112 100644 --- a/drivers/hid/hid-uclogic-params.c +++ b/drivers/hid/hid-uclogic-params.c @@ -431,8 +431,8 @@ static int uclogic_params_frame_init_with_desc( } /** - * uclogic_params_frame_init_v1_buttonpad() - initialize abstract buttonpad - * on a v1 tablet interface. + * uclogic_params_frame_init_v1() - initialize v1 tablet interface frame + * controls. * * @frame: Pointer to the frame parameters to initialize (to be cleaned * up with uclogic_params_frame_cleanup()). Not modified in case @@ -446,8 +446,7 @@ static int uclogic_params_frame_init_with_desc( * Returns: * Zero, if successful. A negative errno code on error. */ -static int uclogic_params_frame_init_v1_buttonpad( - struct uclogic_params_frame *frame, +static int uclogic_params_frame_init_v1(struct uclogic_params_frame *frame, bool *pfound, struct hid_device *hdev) { @@ -488,9 +487,9 @@ static int uclogic_params_frame_init_v1_buttonpad( hid_dbg(hdev, "generic buttons enabled\n"); rc = uclogic_params_frame_init_with_desc( frame, - uclogic_rdesc_buttonpad_v1_arr, - uclogic_rdesc_buttonpad_v1_size, - UCLOGIC_RDESC_BUTTONPAD_V1_ID); + uclogic_rdesc_frame_v1_arr, + uclogic_rdesc_frame_v1_size, + UCLOGIC_RDESC_FRAME_V1_ID); if (rc != 0) goto cleanup; found = true; @@ -750,22 +749,22 @@ static int uclogic_params_huion_init(struct uclogic_params *params, goto cleanup; } else if (found) { hid_dbg(hdev, "pen v2 parameters found\n"); - /* Create v2 buttonpad parameters */ + /* Create v2 frame parameters */ rc = uclogic_params_frame_init_with_desc( &p.frame, - uclogic_rdesc_buttonpad_v2_arr, - uclogic_rdesc_buttonpad_v2_size, - UCLOGIC_RDESC_BUTTONPAD_V2_ID); + uclogic_rdesc_frame_v2_arr, + uclogic_rdesc_frame_v2_size, + UCLOGIC_RDESC_FRAME_V2_ID); if (rc != 0) { hid_err(hdev, - "failed creating v2 buttonpad parameters: %d\n", + "failed creating v2 frame parameters: %d\n", rc); goto cleanup; } /* Link frame button subreports from pen reports */ p.pen.subreport_list[0].value = 0xe0; p.pen.subreport_list[0].id = - UCLOGIC_RDESC_BUTTONPAD_V2_ID; + UCLOGIC_RDESC_FRAME_V2_ID; goto output; } hid_dbg(hdev, "pen v2 parameters not found\n"); @@ -779,21 +778,20 @@ static int uclogic_params_huion_init(struct uclogic_params *params, goto cleanup; } else if (found) { hid_dbg(hdev, "pen v1 parameters found\n"); - /* Try to probe v1 buttonpad */ - rc = uclogic_params_frame_init_v1_buttonpad( - &p.frame, - &found, hdev); + /* Try to probe v1 frame */ + rc = uclogic_params_frame_init_v1(&p.frame, + &found, hdev); if (rc != 0) { - hid_err(hdev, "v1 buttonpad probing failed: %d\n", rc); + hid_err(hdev, "v1 frame probing failed: %d\n", rc); goto cleanup; } - hid_dbg(hdev, "buttonpad v1 parameters%s found\n", + hid_dbg(hdev, "frame v1 parameters%s found\n", (found ? "" : " not")); if (found) { /* Link frame button subreports from pen reports */ p.pen.subreport_list[0].value = 0xe0; p.pen.subreport_list[0].id = - UCLOGIC_RDESC_BUTTONPAD_V1_ID; + UCLOGIC_RDESC_FRAME_V1_ID; } goto output; } @@ -1067,7 +1065,7 @@ int uclogic_params_init(struct uclogic_params *params, UCLOGIC_RDESC_UGEE_G5_FRAME_ID); if (rc != 0) { hid_err(hdev, - "failed creating buttonpad parameters: %d\n", + "failed creating frame parameters: %d\n", rc); goto cleanup; } @@ -1096,12 +1094,12 @@ int uclogic_params_init(struct uclogic_params *params, } else if (found) { rc = uclogic_params_frame_init_with_desc( &p.frame, - uclogic_rdesc_ugee_ex07_buttonpad_arr, - uclogic_rdesc_ugee_ex07_buttonpad_size, + uclogic_rdesc_ugee_ex07_frame_arr, + uclogic_rdesc_ugee_ex07_frame_size, 0); if (rc != 0) { hid_err(hdev, - "failed creating buttonpad parameters: %d\n", + "failed creating frame parameters: %d\n", rc); goto cleanup; } |