summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorEzequiel GarcĂ­a <elezegarcia@gmail.com>2012-06-27 12:52:54 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-07-30 19:54:25 -0300
commitc21813e9746b174e4f426aa0fcb1a69c361a71b2 (patch)
tree79cbe2a22e9f0ae64f59cbb1d4c6cc412aed94c3 /drivers/media
parent23ba641a08a5cf1194cfba8480ecfab8b6623110 (diff)
downloadop-kernel-dev-c21813e9746b174e4f426aa0fcb1a69c361a71b2.zip
op-kernel-dev-c21813e9746b174e4f426aa0fcb1a69c361a71b2.tar.gz
[media] cx25821: Replace struct memcpy with struct assignment
Copying structs by assignment is type safe. Plus, is shorter and easier to read. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/cx25821/cx25821-i2c.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/cx25821/cx25821-i2c.c b/drivers/media/video/cx25821/cx25821-i2c.c
index 0a44b4e..9844549 100644
--- a/drivers/media/video/cx25821/cx25821-i2c.c
+++ b/drivers/media/video/cx25821/cx25821-i2c.c
@@ -305,11 +305,8 @@ int cx25821_i2c_register(struct cx25821_i2c *bus)
dprintk(1, "%s(bus = %d)\n", __func__, bus->nr);
- memcpy(&bus->i2c_adap, &cx25821_i2c_adap_template,
- sizeof(bus->i2c_adap));
- memcpy(&bus->i2c_client, &cx25821_i2c_client_template,
- sizeof(bus->i2c_client));
-
+ bus->i2c_adap = cx25821_i2c_adap_template;
+ bus->i2c_client = cx25821_i2c_client_template;
bus->i2c_adap.dev.parent = &dev->pci->dev;
strlcpy(bus->i2c_adap.name, bus->dev->name, sizeof(bus->i2c_adap.name));
OpenPOWER on IntegriCloud