From: Hans Petter Selasky Date: Mon, 23 May 2011 11:13:06 +0000 (-0300) Subject: [media] Fix compile warning: Dereferencing type-punned pointer will break strict... X-Git-Tag: next-20110726~49^2~23 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e6a6812a878cf04cfc62b6162538e2f459f5b867;p=karo-tx-linux.git [media] Fix compile warning: Dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Hans Petter Selasky Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index 506edcc2ddeb..213ba7d02e88 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c @@ -2264,7 +2264,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size, break; } *user_ptr = (void __user *)buf->m.planes; - *kernel_ptr = (void **)&buf->m.planes; + *kernel_ptr = (void *)&buf->m.planes; *array_size = sizeof(struct v4l2_plane) * buf->length; ret = 1; } @@ -2278,7 +2278,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size, if (ctrls->count != 0) { *user_ptr = (void __user *)ctrls->controls; - *kernel_ptr = (void **)&ctrls->controls; + *kernel_ptr = (void *)&ctrls->controls; *array_size = sizeof(struct v4l2_ext_control) * ctrls->count; ret = 1;