| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2012-2016 Synaptics Incorporated |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 5 | | - * under the terms of the GNU General Public License version 2 as published by |
|---|
| 6 | | - * the Free Software Foundation. |
|---|
| 7 | 4 | */ |
|---|
| 8 | 5 | #include <linux/input.h> |
|---|
| 9 | 6 | #include <linux/input/mt.h> |
|---|
| .. | .. |
|---|
| 76 | 73 | int pitch_y = 0; |
|---|
| 77 | 74 | int rx_receivers = 0; |
|---|
| 78 | 75 | int tx_receivers = 0; |
|---|
| 79 | | - int sensor_flags = 0; |
|---|
| 80 | 76 | |
|---|
| 81 | 77 | item = rmi_get_register_desc_item(&f12->control_reg_desc, 8); |
|---|
| 82 | 78 | if (!item) { |
|---|
| .. | .. |
|---|
| 132 | 128 | offset += 2; |
|---|
| 133 | 129 | } |
|---|
| 134 | 130 | |
|---|
| 135 | | - if (rmi_register_desc_has_subpacket(item, 4)) { |
|---|
| 136 | | - sensor_flags = buf[offset]; |
|---|
| 131 | + /* Skip over sensor flags */ |
|---|
| 132 | + if (rmi_register_desc_has_subpacket(item, 4)) |
|---|
| 137 | 133 | offset += 1; |
|---|
| 138 | | - } |
|---|
| 139 | 134 | |
|---|
| 140 | 135 | sensor->x_mm = (pitch_x * rx_receivers) >> 12; |
|---|
| 141 | 136 | sensor->y_mm = (pitch_y * tx_receivers) >> 12; |
|---|