@@ -29,7 +29,8 @@ MODULE_PARM_DESC(debug, "Toggle FT260 debugging messages");
} while (0)
#define FT260_REPORT_MAX_LENGTH (64)
-#define FT260_I2C_DATA_REPORT_ID(len) (FT260_I2C_REPORT_MIN + (len - 1) / 4)
+#define FT260_I2C_DATA_REPORT_ID(len) (FT260_I2C_REPORT_MIN + ((len) - 1) / 4)
+
/*
* The input report format assigns 62 bytes for the data payload, but ft260
* returns 60 and 2 in two separate transactions. To minimize transfer time
@@ -123,7 +124,7 @@ enum {
FT260_FLAG_START_STOP_REPEATED = 0x07,
};
-#define FT260_SET_REQUEST_VALUE(report_id) ((FT260_FEATURE << 8) | report_id)
+#define FT260_SET_REQUEST_VALUE(report_id) ((FT260_FEATURE << 8) | (report_id))
/* Feature In reports */
Signed-off-by: Christina Quast <contact@christina-quast.de> Cc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Cc: Daniel Beer <daniel.beer@igorinstitute.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- drivers/hid/hid-ft260.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)