linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Devendra Naga <develkernel412222@gmail.com>
To: linux-media@vger.kernel.org, devel@driverdev.osuosl.org
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	Ezequiel Garcia <elezegarcia@gmail.com>,
	Devendra Naga <develkernel412222@gmail.com>
Subject: [PATCH] staging: media: cxd2099: remove memcpy of similar structure variables
Date: Mon,  6 Aug 2012 02:25:02 +0545	[thread overview]
Message-ID: <1344199202-15744-1-git-send-email-develkernel412222@gmail.com> (raw)

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


             reply	other threads:[~2012-08-05 20:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-05 20:40 Devendra Naga [this message]
2012-08-05 21:51 ` [PATCH] staging: media: cxd2099: remove memcpy of similar structure variables Ezequiel Garcia
2012-08-06  5:28   ` Devendra Naga
2012-08-06 10:40     ` Ezequiel Garcia
2012-08-12 10:30       ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344199202-15744-1-git-send-email-develkernel412222@gmail.com \
    --to=develkernel412222@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=elezegarcia@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).