mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-21 21:00:35 +07:00
[media] cx231xx: 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
630081e990
commit
23ba641a08
@ -499,10 +499,8 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus)
|
|||||||
|
|
||||||
BUG_ON(!dev->cx231xx_send_usb_command);
|
BUG_ON(!dev->cx231xx_send_usb_command);
|
||||||
|
|
||||||
memcpy(&bus->i2c_adap, &cx231xx_adap_template, sizeof(bus->i2c_adap));
|
bus->i2c_adap = cx231xx_adap_template;
|
||||||
memcpy(&bus->i2c_client, &cx231xx_client_template,
|
bus->i2c_client = cx231xx_client_template;
|
||||||
sizeof(bus->i2c_client));
|
|
||||||
|
|
||||||
bus->i2c_adap.dev.parent = &dev->udev->dev;
|
bus->i2c_adap.dev.parent = &dev->udev->dev;
|
||||||
|
|
||||||
strlcpy(bus->i2c_adap.name, bus->dev->name, sizeof(bus->i2c_adap.name));
|
strlcpy(bus->i2c_adap.name, bus->dev->name, sizeof(bus->i2c_adap.name));
|
||||||
|
Loading…
Reference in New Issue
Block a user