linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: media: cxd2099: remove memcpy of similar structure variables
@ 2012-08-05 20:40 Devendra Naga
  2012-08-05 21:51 ` Ezequiel Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: Devendra Naga @ 2012-08-05 20:40 UTC (permalink / raw)
  To: linux-media, devel; +Cc: Mauro Carvalho Chehab, Ezequiel Garcia, Devendra Naga

structure variables can be assigned, no memcpy needed,
remove the memcpy and use assignment for the cfg and en variables.

Tested by Compilation Only

Suggested-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
---
 drivers/staging/media/cxd2099/cxd2099.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/cxd2099/cxd2099.c b/drivers/staging/media/cxd2099/cxd2099.c
index 4f2235f..0ff1972 100644
--- a/drivers/staging/media/cxd2099/cxd2099.c
+++ b/drivers/staging/media/cxd2099/cxd2099.c
@@ -696,13 +696,13 @@ struct dvb_ca_en50221 *cxd2099_attach(struct cxd2099_cfg *cfg,
 		return NULL;
 
 	mutex_init(&ci->lock);
-	memcpy(&ci->cfg, cfg, sizeof(struct cxd2099_cfg));
+	ci->cfg = *cfg;
 	ci->i2c = i2c;
 	ci->lastaddress = 0xff;
 	ci->clk_reg_b = 0x4a;
 	ci->clk_reg_f = 0x1b;
 
-	memcpy(&ci->en, &en_templ, sizeof(en_templ));
+	ci->en = en_templ;
 	ci->en.data = ci;
 	init(ci);
 	printk(KERN_INFO "Attached CXD2099AR at %02x\n", ci->cfg.adr);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-12 10:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-05 20:40 [PATCH] staging: media: cxd2099: remove memcpy of similar structure variables Devendra Naga
2012-08-05 21:51 ` Ezequiel Garcia
2012-08-06  5:28   ` Devendra Naga
2012-08-06 10:40     ` Ezequiel Garcia
2012-08-12 10:30       ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).