mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
[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>
This commit is contained in:
parent
5a6fa3fe9a
commit
ddebe8cdd6
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user