Skip to content

Commit

Permalink
[media] staging: media: cxd2099: remove memcpy of similar structure v…
Browse files Browse the repository at this point in the history
…ariables

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>
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Cc: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Devendra Naga authored and Mauro Carvalho Chehab committed Aug 12, 2012
1 parent ada3678 commit 8d9b258
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/media/cxd2099/cxd2099.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8d9b258

Please sign in to comment.