From patchwork Fri Jan 4 20:59:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 1934681 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 81ABF3FF0F for ; Fri, 4 Jan 2013 21:00:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754975Ab3ADU77 (ORCPT ); Fri, 4 Jan 2013 15:59:59 -0500 Received: from mail-vb0-f53.google.com ([209.85.212.53]:54974 "EHLO mail-vb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754865Ab3ADU74 (ORCPT ); Fri, 4 Jan 2013 15:59:56 -0500 Received: by mail-vb0-f53.google.com with SMTP id b23so17012594vbz.12 for ; Fri, 04 Jan 2013 12:59:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=xNv154TuFRixSYZCeIZXQt4HmEwGaYWn3acnQPhhZPo=; b=MXj1D6857RtmRAl0DlDN2ytXXk5H0uMI3q5P6jikAQy0rQgZK0sZHiyU4SLdgmnvuu uTaEU57ItZQRopTl7t4xn+JR7xm2rZJmVFEp/mNGSv1VCeUNG2Q9DshFCDCBAG9pBbw5 AfnhmLFWWGiYVaDkQKW3OyQ09eJFugop6hGPIbQ3h10AZJE3MMCweAE5ZShYRc4W6Gga 9T1NzqZwQkHZVK6Xfdh+CI5laV0nSTZLW23/N9tBH38R22/BXmG5qWs7jdnon/ODeZH1 mKxgkCvgoXvBWD+7Hv9yk0VuBiSjCmPwSNjtTwnUdpuLfr/3h25DwpMvXkgp8spLPS5C MVzQ== X-Received: by 10.58.247.132 with SMTP id ye4mr80481204vec.9.1357333195595; Fri, 04 Jan 2013 12:59:55 -0800 (PST) Received: from devin-ubuntu2.home (pool-108-54-72-165.nycmny.fios.verizon.net. [108.54.72.165]) by mx.google.com with ESMTPS id z20sm47278440vds.12.2013.01.04.12.59.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Jan 2013 12:59:54 -0800 (PST) From: Devin Heitmueller To: linux-media@vger.kernel.org Cc: Devin Heitmueller , Hans Verkuil Subject: [PATCH 03/15] em28xx: fix VIDIOC_DBG_G_CHIP_IDENT compliance errors. Date: Fri, 4 Jan 2013 15:59:33 -0500 Message-Id: <1357333186-8466-4-git-send-email-dheitmueller@kernellabs.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1357333186-8466-1-git-send-email-dheitmueller@kernellabs.com> References: <1357333186-8466-1-git-send-email-dheitmueller@kernellabs.com> X-Gm-Message-State: ALoCoQk//ZCoc5zpddqAN3x6HRvSuN+jp8+V1bQUbmvI62m1bCov5KRXet+ICjlJDKzldD/IfCT/ Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Hans Verkuil Signed-off-by: Devin Heitmueller --- drivers/media/usb/em28xx/em28xx-video.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index f025440..b71df42 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -1403,6 +1403,14 @@ static int vidioc_g_chip_ident(struct file *file, void *priv, chip->ident = V4L2_IDENT_NONE; chip->revision = 0; + if (chip->match.type == V4L2_CHIP_MATCH_HOST) { + if (v4l2_chip_match_host(&chip->match)) + chip->ident = V4L2_IDENT_NONE; + return 0; + } + if (chip->match.type != V4L2_CHIP_MATCH_I2C_DRIVER && + chip->match.type != V4L2_CHIP_MATCH_I2C_ADDR) + return -EINVAL; v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_chip_ident, chip);