Rename "nrc" into "n_elems" and explicitly name the number of
rows and the number of columns.

Signed-off-by: Benjamin Tissoires <[email protected]>
---
 drivers/input/input-mt.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c
index fbe29fc..b6ee42a 100644
--- a/drivers/input/input-mt.c
+++ b/drivers/input/input-mt.c
@@ -404,7 +404,7 @@ int input_mt_assign_slots(struct input_dev *dev, int *slots,
                          const struct input_mt_pos *pos, int num_pos)
 {
        struct input_mt *mt = dev->mt;
-       int nrc;
+       int n_elems, n_rows, n_columns;
 
        if (!mt || !mt->red)
                return -ENXIO;
@@ -413,8 +413,10 @@ int input_mt_assign_slots(struct input_dev *dev, int 
*slots,
        if (num_pos < 1)
                return 0;
 
-       nrc = input_mt_set_matrix(mt, pos, num_pos);
-       find_reduced_matrix(mt->red, num_pos, nrc / num_pos, nrc);
+       n_elems = input_mt_set_matrix(mt, pos, num_pos);
+       n_rows = n_elems / num_pos;
+       n_columns = num_pos;
+       find_reduced_matrix(mt->red, n_columns, n_rows, n_elems);
        input_mt_set_slots(mt, slots, num_pos);
 
        return 0;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to