[media] as102: add __packed attribute to structs defined inside packed structs
authorGianluca Gennari <gennarone@gmail.com>
Tue, 6 Mar 2012 12:47:45 +0000 (09:47 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 19 Mar 2012 17:26:02 +0000 (14:26 -0300)
commitabf9d005375d6c6160cc9c17e5dcac32e412c8dc
treefee45be75c90d5c101c1338dd97e084e272fec72
parent962f8f67e48693d110c26d06089406dd9931474d
[media] as102: add __packed attribute to structs defined inside packed structs

This patch fixes a regression in kernel 3.3 due to this patch:

http://patchwork.linuxtv.org/patch/8332/

That patch changes "#pragma pack(1)" with "__packed" attributes, but it is not
complete. In fact, in the as102 driver there are a lot of structs/unions
defined inside other structs/unions.
When the "__packed" attribute is applied only on the external struct, it will
not affect the internal struct definitions.
So the regression is fixed by specifiying the "__packed" attribute also on the
internal structs.

This patch should go into 3.3, as it fixes a regression introduced in the new
kernel version.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Ryley Angus <rangus@student.unimelb.edu.au>
Cc: stable@kernel.org # for v3.3
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/as102/as102_fw.h
drivers/staging/media/as102/as10x_cmd.h
drivers/staging/media/as102/as10x_types.h