From: Ezequiel GarcĂ­a Date: Wed, 27 Jun 2012 15:52:52 +0000 (-0300) Subject: [media] cx23885: Replace struct memcpy with struct assignment X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=630081e99072f94788011badd6d12707fa3ab410;p=openwrt%2Fstaging%2Fblogic.git [media] cx23885: 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c index 615c71fb4668..4887314339cb 100644 --- a/drivers/media/video/cx23885/cx23885-i2c.c +++ b/drivers/media/video/cx23885/cx23885-i2c.c @@ -316,11 +316,8 @@ int cx23885_i2c_register(struct cx23885_i2c *bus) dprintk(1, "%s(bus = %d)\n", __func__, bus->nr); - memcpy(&bus->i2c_adap, &cx23885_i2c_adap_template, - sizeof(bus->i2c_adap)); - memcpy(&bus->i2c_client, &cx23885_i2c_client_template, - sizeof(bus->i2c_client)); - + bus->i2c_adap = cx23885_i2c_adap_template; + bus->i2c_client = cx23885_i2c_client_template; bus->i2c_adap.dev.parent = &dev->pci->dev; strlcpy(bus->i2c_adap.name, bus->dev->name,