[media] saa7164: Replace struct memcpy with struct assignment
authorEzequiel García <elezegarcia@gmail.com>
Wed, 27 Jun 2012 15:52:51 +0000 (12:52 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Jul 2012 22:53:46 +0000 (19:53 -0300)
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>
drivers/media/video/saa7164/saa7164-i2c.c

index d8d7baa4c63646d8ee5bbe4a6cb7a04221c270a9..4f7e3b42263fcc6644294bbcb9b2d47a382c2077 100644 (file)
@@ -97,11 +97,8 @@ int saa7164_i2c_register(struct saa7164_i2c *bus)
 
        dprintk(DBGLVL_I2C, "%s(bus = %d)\n", __func__, bus->nr);
 
-       memcpy(&bus->i2c_adap, &saa7164_i2c_adap_template,
-              sizeof(bus->i2c_adap));
-
-       memcpy(&bus->i2c_client, &saa7164_i2c_client_template,
-              sizeof(bus->i2c_client));
+       bus->i2c_adap = saa7164_i2c_adap_template;
+       bus->i2c_client = saa7164_i2c_client_template;
 
        bus->i2c_adap.dev.parent = &dev->pci->dev;