From patchwork Wed Sep 26 10:25:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 1508801 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E5367DF238 for ; Wed, 26 Sep 2012 10:25:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753112Ab2IZKZS (ORCPT ); Wed, 26 Sep 2012 06:25:18 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:48212 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119Ab2IZKZR (ORCPT ); Wed, 26 Sep 2012 06:25:17 -0400 Received: by yenm12 with SMTP id m12so76575yen.19 for ; Wed, 26 Sep 2012 03:25:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=uLNT5T1fVZzkT/3GMUOdYFvmMs0jIhXC1CWsicIGIeE=; b=ZKwB6VyK/tqf3/QySANnnd/Um3LVegk3QQbp2A5tBg4qGwOIjpLl+QuMdB07vOkY+k ehVfxDS2kTEtUl9hPgve1/e9Vr7MDqUv+MYebhwTgUbiQIFxLC9fmGGAhs4b0GMxhDia jSQh0dkZrWWBrwni81J4zo28XXvoaBSMC0BMbDUKJo5w6ZVW4KqeOayj1nFQ0GDuSXep Y6PERmEDhg6UGhqBsS4+RtAt+YVYOJy6XEFhNkLjK4zi54oJDEjI25QI8ixNQHNv/7G3 eSK9/ySkrWpyFvbNus4tlfVMSDDuzRqzpRS8bHbJQWOt3sZkI5HTfgoRwWh3lh5n6Pvh a2Kw== Received: by 10.236.182.197 with SMTP id o45mr32743yhm.23.1348655116453; Wed, 26 Sep 2012 03:25:16 -0700 (PDT) Received: from localhost.cpe.express.com.ar ([200.81.126.15]) by mx.google.com with ESMTPS id k2sm3102304anl.11.2012.09.26.03.25.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 26 Sep 2012 03:25:15 -0700 (PDT) From: Ezequiel Garcia To: Cc: Ezequiel Garcia Subject: [PATCH] em28xx: Replace memcpy with struct assignment Date: Wed, 26 Sep 2012 07:25:12 -0300 Message-Id: <1348655112-13601-1-git-send-email-elezegarcia@gmail.com> X-Mailer: git-send-email 1.7.8.6 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This kind of memcpy() is error-prone and its replacement with a struct assignment is prefered. Signed-off-by: Ezequiel Garcia --- drivers/media/usb/em28xx/em28xx-cards.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index ca62b99..1a07857 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