diff options
author | Fengguang Wu <fengguang.wu@intel.com> | 2013-12-20 07:16:42 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-01-07 08:01:03 -0200 |
commit | 65eccc7a8810b28e60572a4c4877d2a75814e7fd (patch) | |
tree | 40c251e2a2d650dd6f70aa6bf898c2ff6161b86a | |
parent | 581d88c470bce802cab00f92536917a315b09ad2 (diff) |
[media] fix coccinelle warnings
drivers/staging/media/bcm2048/radio-bcm2048.c:2632:1-7: Replace memcpy with struct assignment
/c/kernel-tests/src/cocci/drivers/staging/media/bcm2048/radio-bcm2048.c:744:1-7: Replace memcpy with struct assignment
/c/kernel-tests/src/cocci/drivers/staging/media/bcm2048/radio-bcm2048.c:2360:3-9: Replace memcpy with struct assignment
Generated by: coccinelle/misc/memcpy-assign.cocci
CC: Hans Verkuil <hans.verkuil@cisco.com>
CC: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/staging/media/bcm2048/radio-bcm2048.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index 37ff89931eb..9344daef4d6 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -741,8 +741,7 @@ static int bcm2048_set_region(struct bcm2048_device *bdev, u8 region) return -EINVAL; mutex_lock(&bdev->mutex); - memcpy(&bdev->region_info, ®ion_configs[region], - sizeof(struct region_info)); + bdev->region_info = region_configs[region]; mutex_unlock(&bdev->mutex); if (bdev->frequency < region_configs[region].bottom_frequency || @@ -2358,7 +2357,7 @@ static int bcm2048_vidioc_queryctrl(struct file *file, void *priv, for (i = 0; i < ARRAY_SIZE(bcm2048_v4l2_queryctrl); i++) { if (qc->id && qc->id == bcm2048_v4l2_queryctrl[i].id) { - memcpy(qc, &(bcm2048_v4l2_queryctrl[i]), sizeof(*qc)); + *qc = bcm2048_v4l2_queryctrl[i]; return 0; } } @@ -2630,8 +2629,7 @@ static int bcm2048_i2c_driver_probe(struct i2c_client *client, dev_dbg(&client->dev, "IRQ not configured. Using timeouts.\n"); } - memcpy(bdev->videodev, &bcm2048_viddev_template, - sizeof(bcm2048_viddev_template)); + *bdev->videodev = bcm2048_viddev_template; video_set_drvdata(bdev->videodev, bdev); if (video_register_device(bdev->videodev, VFL_TYPE_RADIO, radio_nr)) { dev_dbg(&client->dev, "Could not register video device.\n"); |