From: Ezequiel Garcia <elezegarcia@gmail.com>
Date: Wed, 26 Sep 2012 09:25:12 +0000 (-0300)
Subject: [media] em28xx: Replace memcpy with struct assignment
X-Git-Tag: firefly_0821_release~3680^2~275^2~924
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e0f6e4d6ff8d82ca6813f47d12f85224d7491d9e;p=firefly-linux-kernel-4.4.55.git

[media] em28xx: Replace memcpy with struct assignment

This kind of memcpy() is error-prone and its
replacement with a struct assignment is prefered.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---

diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index ab98d0845861..bd5e1803d87c 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -2203,7 +2203,7 @@ EXPORT_SYMBOL_GPL(em28xx_tuner_callback);
 
 static inline void em28xx_set_model(struct em28xx *dev)
 {
-	memcpy(&dev->board, &em28xx_boards[dev->model], sizeof(dev->board));
+	dev->board = em28xx_boards[dev->model];
 
 	/* Those are the default values for the majority of boards
 	   Use those values if not specified otherwise at boards entry