diff options
author | Ezequiel GarcĂa <elezegarcia@gmail.com> | 2012-06-27 11:52:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-30 18:53:46 -0400 |
commit | ddebe8cdd6c8d5f937c6587d2636079a5d096247 (patch) | |
tree | 0a34fe8d7b1353e325ded4c5a8472662822af358 | |
parent | 5a6fa3fe9a465d1c5e1e6bf8a4ad1ca9063131a5 (diff) |
[media] saa7164: 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>
-rw-r--r-- | drivers/media/video/saa7164/saa7164-i2c.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/saa7164/saa7164-i2c.c b/drivers/media/video/saa7164/saa7164-i2c.c index d8d7baa4c636..4f7e3b42263f 100644 --- a/drivers/media/video/saa7164/saa7164-i2c.c +++ b/drivers/media/video/saa7164/saa7164-i2c.c | |||
@@ -97,11 +97,8 @@ int saa7164_i2c_register(struct saa7164_i2c *bus) | |||
97 | 97 | ||
98 | dprintk(DBGLVL_I2C, "%s(bus = %d)\n", __func__, bus->nr); | 98 | dprintk(DBGLVL_I2C, "%s(bus = %d)\n", __func__, bus->nr); |
99 | 99 | ||
100 | memcpy(&bus->i2c_adap, &saa7164_i2c_adap_template, | 100 | bus->i2c_adap = saa7164_i2c_adap_template; |
101 | sizeof(bus->i2c_adap)); | 101 | bus->i2c_client = saa7164_i2c_client_template; |
102 | |||
103 | memcpy(&bus->i2c_client, &saa7164_i2c_client_template, | ||
104 | sizeof(bus->i2c_client)); | ||
105 | 102 | ||
106 | bus->i2c_adap.dev.parent = &dev->pci->dev; | 103 | bus->i2c_adap.dev.parent = &dev->pci->dev; |
107 | 104 | ||