Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1244405 > unrolled thread
| Started by | Dudley Du <dudl@cypress.com> |
|---|---|
| First post | 2015-10-12 08:20 +0200 |
| Last post | 2015-10-14 08:40 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] input: cyapa: fix the copy paste error on electrodes_rx value Dudley Du <dudl@cypress.com> - 2015-10-12 08:20 +0200
Re: [PATCH] input: cyapa: fix the copy paste error on electrodes_rx value Benson Leung <bleung@google.com> - 2015-10-12 19:40 +0200
Re: [PATCH] input: cyapa: fix the copy paste error on electrodes_rx value Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-10-14 08:40 +0200
| From | Dudley Du <dudl@cypress.com> |
|---|---|
| Date | 2015-10-12 08:20 +0200 |
| Subject | [PATCH] input: cyapa: fix the copy paste error on electrodes_rx value |
| Message-ID | <qiECL-7jp-11@gated-at.bofh.it> |
Fix the copy paste error on the electrodes_rx value set code which will
cause the electrodes_rx value be always set to the value of electrodes_y.
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Dudley Du <dudl@cypress.com>
---
drivers/input/mouse/cyapa_gen6.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/input/mouse/cyapa_gen6.c b/drivers/input/mouse/cyapa_gen6.c
index 5f19107..a5eb5ae 100644
--- a/drivers/input/mouse/cyapa_gen6.c
+++ b/drivers/input/mouse/cyapa_gen6.c
@@ -241,14 +241,12 @@ static int cyapa_gen6_read_sys_info(struct cyapa *cyapa)
memcpy(&cyapa->product_id[13], &resp_data[62], 2);
cyapa->product_id[15] = '\0';
+ /* Get the number of Rx electrodes. */
rotat_align = resp_data[68];
- if (rotat_align) {
+ if (rotat_align)
cyapa->electrodes_rx = cyapa->electrodes_y;
- cyapa->electrodes_rx = cyapa->electrodes_y;
- } else {
+ else
cyapa->electrodes_rx = cyapa->electrodes_x;
- cyapa->electrodes_rx = cyapa->electrodes_y;
- }
cyapa->aligned_electrodes_rx = (cyapa->electrodes_rx + 3) & ~3u;
if (!cyapa->electrodes_x || !cyapa->electrodes_y ||
--
1.9.1
---------------------------------------------------------------
This message and any attachments may contain Cypress (or its
subsidiaries) confidential information. If it has been received
in error, please advise the sender and immediately delete this
message.
---------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Benson Leung <bleung@google.com> |
|---|---|
| Date | 2015-10-12 19:40 +0200 |
| Message-ID | <qiPeO-5SP-3@gated-at.bofh.it> |
| In reply to | #1244405 |
On Sun, Oct 11, 2015 at 11:17 PM, Dudley Du <dudl@cypress.com> wrote: > > Fix the copy paste error on the electrodes_rx value set code which will > cause the electrodes_rx value be always set to the value of electrodes_y. > > Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> > Reviewed-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> > Signed-off-by: Dudley Du <dudl@cypress.com> Reviewed-by: Benson Leung <bleung@chromium.org> Thanks! -- Benson Leung Senior Software Engineer, Chrome OS Google Inc. bleung@google.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2015-10-14 08:40 +0200 |
| Subject | Re: [PATCH] input: cyapa: fix the copy paste error on electrodes_rx value |
| Message-ID | <qjnTc-78Z-19@gated-at.bofh.it> |
| In reply to | #1244405 |
On Mon, Oct 12, 2015 at 02:17:04PM +0800, Dudley Du wrote:
> Fix the copy paste error on the electrodes_rx value set code which will
> cause the electrodes_rx value be always set to the value of electrodes_y.
>
> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Reviewed-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> Signed-off-by: Dudley Du <dudl@cypress.com>
Applied (with change to ternary ?: ), thank you.
> ---
> drivers/input/mouse/cyapa_gen6.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/input/mouse/cyapa_gen6.c b/drivers/input/mouse/cyapa_gen6.c
> index 5f19107..a5eb5ae 100644
> --- a/drivers/input/mouse/cyapa_gen6.c
> +++ b/drivers/input/mouse/cyapa_gen6.c
> @@ -241,14 +241,12 @@ static int cyapa_gen6_read_sys_info(struct cyapa *cyapa)
> memcpy(&cyapa->product_id[13], &resp_data[62], 2);
> cyapa->product_id[15] = '\0';
>
> + /* Get the number of Rx electrodes. */
> rotat_align = resp_data[68];
> - if (rotat_align) {
> + if (rotat_align)
> cyapa->electrodes_rx = cyapa->electrodes_y;
> - cyapa->electrodes_rx = cyapa->electrodes_y;
> - } else {
> + else
> cyapa->electrodes_rx = cyapa->electrodes_x;
> - cyapa->electrodes_rx = cyapa->electrodes_y;
> - }
> cyapa->aligned_electrodes_rx = (cyapa->electrodes_rx + 3) & ~3u;
>
> if (!cyapa->electrodes_x || !cyapa->electrodes_y ||
> --
> 1.9.1
>
>
> ---------------------------------------------------------------
> This message and any attachments may contain Cypress (or its
> subsidiaries) confidential information. If it has been received
> in error, please advise the sender and immediately delete this
> message.
> ---------------------------------------------------------------
>
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web