diff options
author | Laurent Pinchart <laurent.pinchart@linaro.org> | 2015-04-22 13:08:17 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@linaro.org> | 2015-04-28 21:02:48 +0300 |
commit | 9e762dec2654772bde323a26b88f57aab4e61089 (patch) | |
tree | df7fcabceaf820ac0786f60a9425613da0c22c44 | |
parent | 801fcd885609c0156fe672636a011fa04a4bef8f (diff) |
media: mv-sc2: Use sizeof(*var) instead of sizeof(type)
The kernel coding style favours sizeof(*var) over sizeof(type), update
the code accordingly.
Signed-off-by: Laurent Pinchart <laurent.pinchart@linaro.org>
Acked-By: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
-rw-r--r-- | drivers/media/platform/soc_camera/mv_sc2_camera.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/platform/soc_camera/mv_sc2_camera.c b/drivers/media/platform/soc_camera/mv_sc2_camera.c index d6babe8fdeb0..9d2fbdef7b3b 100644 --- a/drivers/media/platform/soc_camera/mv_sc2_camera.c +++ b/drivers/media/platform/soc_camera/mv_sc2_camera.c @@ -1021,7 +1021,7 @@ static int mccic_set_fmt(struct soc_camera_device *icd, pix_mp->num_planes = mccic_get_num_planes(xlate->host_fmt); mccic_setup_mp_pixfmt(icd->parent, pix_mp, xlate->host_fmt); icd->current_fmt = xlate; - memcpy(&(mcam_dev->mp), pix_mp, sizeof(struct v4l2_pix_format_mplane)); + memcpy(&mcam_dev->mp, pix_mp, sizeof(mcam_dev->mp)); /* 3. save teh fmt in ccic_dma_dev */ dma_dev->pixfmt = xlate->host_fmt->fourcc; @@ -1378,8 +1378,7 @@ static int mv_camera_probe(struct platform_device *pdev) pdev->id = ret; /* 2. alloc mcam_dev and setup */ - mcam_dev = devm_kzalloc(&pdev->dev, sizeof(struct mv_camera_dev), - GFP_KERNEL); + mcam_dev = devm_kzalloc(&pdev->dev, sizeof(*mcam_dev), GFP_KERNEL); if (!mcam_dev) { dev_err(&pdev->dev, "Could not allocate mcam dev\n"); return -ENOMEM; |