From patchwork Fri Jan 17 17:45:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Frank_Sch=C3=A4fer?= X-Patchwork-Id: 3506481 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2EA069F169 for ; Fri, 17 Jan 2014 17:44:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7148A2015D for ; Fri, 17 Jan 2014 17:44:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 97DD12015E for ; Fri, 17 Jan 2014 17:44:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752817AbaAQRod (ORCPT ); Fri, 17 Jan 2014 12:44:33 -0500 Received: from mail-ee0-f50.google.com ([74.125.83.50]:39747 "EHLO mail-ee0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753134AbaAQRo3 (ORCPT ); Fri, 17 Jan 2014 12:44:29 -0500 Received: by mail-ee0-f50.google.com with SMTP id d17so2246859eek.37 for ; Fri, 17 Jan 2014 09:44:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=/7Qw74qoWjBKQOQitNlxf6KEjYsG0gfpPn/iMXzTNGE=; b=BZdy8nyzqQ7dSLmhdKYyWmmVAyKHwkHU5sTlVyyWzSmrUVv/dwp0Yj5Cq4NiCcAiYo qs/BFOFvV8l+PN81W9g4aqVNWtYdK26UFYXJ1VeZ3nCzeEkPtfhq/vasaj3FMPilpeLN gngoOxm4t8DCrWPid1kqNURBgdeGw4oHNw5MBefYRxmhGmpwNYBv+Lf+772wMot65TA9 6bbarX/uf6JnQsjxTPm4PT4rtF3/QQtBrNnEQgE7KNKz0hXL5HUCtV43IXdmp2Yp0pKW tCTjva1/z8yqWcoYgTXXwZalCMP1RW+OJsaJ0r0gWom8JHl93lfPcGA/gzS+2t0n4/yU sUIA== X-Received: by 10.14.177.200 with SMTP id d48mr4080109eem.8.1389980668513; Fri, 17 Jan 2014 09:44:28 -0800 (PST) Received: from Athlon64X2-5000.site (ip-178-200-115-160.unitymediagroup.de. [178.200.115.160]) by mx.google.com with ESMTPSA id z49sm15841147eeo.10.2014.01.17.09.44.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jan 2014 09:44:28 -0800 (PST) From: =?UTF-8?q?Frank=20Sch=C3=A4fer?= To: m.chehab@samsung.com Cc: linux-media@vger.kernel.org, =?UTF-8?q?Frank=20Sch=C3=A4fer?= Subject: [PATCH 3/3] em28xx-v4l: do not call em28xx_init_camera() if the device has no sensor Date: Fri, 17 Jan 2014 18:45:32 +0100 Message-Id: <1389980732-8375-3-git-send-email-fschaefer.oss@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1389980732-8375-1-git-send-email-fschaefer.oss@googlemail.com> References: <1389980732-8375-1-git-send-email-fschaefer.oss@googlemail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This avoids the unnecessary temporary registration of a dummy V4L2 clock. Signed-off-by: Frank Schäfer --- drivers/media/usb/em28xx/em28xx-video.c | 3 ++- 1 Datei geändert, 2 Zeilen hinzugefügt(+), 1 Zeile entfernt(-) diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 09e18da..2775c90 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -2273,7 +2273,8 @@ static int em28xx_v4l2_init(struct em28xx *dev) } em28xx_tuner_setup(dev); - em28xx_init_camera(dev); + if (dev->em28xx_sensor != EM28XX_NOSENSOR) + em28xx_init_camera(dev); /* Configure audio */ ret = em28xx_audio_setup(dev);