media: allegro: drop length field from message header
authorMichael Tretter <m.tretter@pengutronix.de>
Mon, 13 Jul 2020 14:42:27 +0000 (16:42 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 12:00:31 +0000 (14:00 +0200)
commitd8fefda89ee292b2871ce523227e5a49d4afc6ea
tree8519318e7e55f49446f8ddd923998ef1d4f0a1c0
parentc7ce107f9d899a15e4b9c24c4839abdbef88a063
media: allegro: drop length field from message header

The length of the message will be determined when the message is
encoded.  Writing the size of the struct into the message in the driver
won't be the actual length of the message that is send to the firmware.
Therefore, drop the length field from the message.

Since the header is the same for all response messages, it does not make
sense to read the header in each decoding function, but we can simply
decode it once before dispatching to the respective functions.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/allegro-dvt/allegro-core.c
drivers/staging/media/allegro-dvt/allegro-mail.c
drivers/staging/media/allegro-dvt/allegro-mail.h