From c21813e9746b174e4f426aa0fcb1a69c361a71b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ezequiel=20Garc=C3=ADa?= Date: Wed, 27 Jun 2012 12:52:54 -0300 Subject: [PATCH] [media] cx25821: 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 --- drivers/media/video/cx25821/cx25821-i2c.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/media/video/cx25821/cx25821-i2c.c b/drivers/media/video/cx25821/cx25821-i2c.c index 0a44b4ea1cec..9844549764c9 100644 --- a/drivers/media/video/cx25821/cx25821-i2c.c +++ b/drivers/media/video/cx25821/cx25821-i2c.c @@ -305,11 +305,8 @@ int cx25821_i2c_register(struct cx25821_i2c *bus) dprintk(1, "%s(bus = %d)\n", __func__, bus->nr); - memcpy(&bus->i2c_adap, &cx25821_i2c_adap_template, - sizeof(bus->i2c_adap)); - memcpy(&bus->i2c_client, &cx25821_i2c_client_template, - sizeof(bus->i2c_client)); - + bus->i2c_adap = cx25821_i2c_adap_template; + bus->i2c_client = cx25821_i2c_client_template; bus->i2c_adap.dev.parent = &dev->pci->dev; strlcpy(bus->i2c_adap.name, bus->dev->name, sizeof(bus->i2c_adap.name)); -- 2.30.2