[media] em28xx: Replace memcpy with struct assignment
authorEzequiel Garcia <elezegarcia@gmail.com>
Wed, 26 Sep 2012 09:25:12 +0000 (06:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 6 Oct 2012 15:23:15 +0000 (12:23 -0300)
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>
drivers/media/usb/em28xx/em28xx-cards.c

index ab98d0845861bbbe4fdb3027fe7ccd2391b2ac34..bd5e1803d87c0f8c439c1b1051ff2571da63c1a1 100644 (file)
@@ -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