Commit 4e870e6b authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: himax_hx83112b - fix incorrect size when reading product ID

We need to read a u32 value (4 bytes), not size of a pointer to that
value.

Also, himax_read_mcu() wrapper is an overkill, remove it and use
himax_bus_read() directly.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408200301.Ujpj7Vov-lkp@intel.com/
Fixes: 0944829d ("Input: himax_hx83112b - implement MCU register reading")
Tested-by: default avatarFelix Kaechele <felix@kaechele.ca>
Link: https://lore.kernel.org/r/ZsPdmtfC54R7JVxR@google.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent aaa4ca87
......@@ -130,17 +130,6 @@ static int himax_bus_read(struct himax_ts_data *ts, u32 address, void *dst,
return 0;
}
static int himax_read_mcu(struct himax_ts_data *ts, u32 address, u32 *dst)
{
int error;
error = himax_bus_read(ts, address, dst, sizeof(dst));
if (error)
return error;
return 0;
}
static void himax_reset(struct himax_ts_data *ts)
{
gpiod_set_value_cansleep(ts->gpiod_rst, 1);
......@@ -160,7 +149,8 @@ static int himax_read_product_id(struct himax_ts_data *ts, u32 *product_id)
{
int error;
error = himax_read_mcu(ts, HIMAX_REG_ADDR_ICID, product_id);
error = himax_bus_read(ts, HIMAX_REG_ADDR_ICID, product_id,
sizeof(*product_id));
if (error)
return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment