From patchwork Thu Nov 1 12:42:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 1684981 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 9EEDA3FE1F for ; Thu, 1 Nov 2012 12:42:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759260Ab2KAMmI (ORCPT ); Thu, 1 Nov 2012 08:42:08 -0400 Received: from mail-gh0-f174.google.com ([209.85.160.174]:35473 "EHLO mail-gh0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757839Ab2KAMmH (ORCPT ); Thu, 1 Nov 2012 08:42:07 -0400 Received: by mail-gh0-f174.google.com with SMTP id g15so459258ghb.19 for ; Thu, 01 Nov 2012 05:42:06 -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=il737AXD4mZb3uLzvrSwA7z4oGah+b4b83CZpcknfoM=; b=ZPQcLpFeaS2x8N0rpyDnFH8QCmYGO+I1XDsUN2KWlcj5wJzMw97u0YmuZ6F560jYf9 rD3eumU2UGVhm5pe58frQLjZaexNHkss/OkFQMGBrs7F2e2+EWPtDrm3cD6S0CbEdgM4 /re1uYy+qkSQql77jaHWAsIRxiZhy5yufsvgUJcT17Kk5Kh/TyN2s3IU5kHOHMcYBQpp m3F1Ee5PQMeIwhwl4dDzyi9Rabs9Ii/b/Dcfz3jDwjUNfjF82a2av+QQvmdMYUS5TYhx byUoXGqcnr6ahe7XtBdXSQcY2KvKy66jalxul8L1XLSoOWIhHwImF6pdYRMj6Vu4U+Lu nhzw== Received: by 10.101.152.11 with SMTP id e11mr6443354ano.44.1351773726101; Thu, 01 Nov 2012 05:42:06 -0700 (PDT) Received: from localhost.cpe.express.com.ar (71.222.3.200.ros.express.com.ar. [200.3.222.71]) by mx.google.com with ESMTPS id o12sm6040847anp.8.2012.11.01.05.42.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 Nov 2012 05:42:05 -0700 (PDT) From: Ezequiel Garcia To: Cc: Ezequiel Garcia , Andrea Anacleto , Arvydas Sidorenko , Jaime Velasco Juan , Hans de Goede Subject: [PATCH] stkwebcam: Fix sparse warning on undeclared symbol Date: Thu, 1 Nov 2012 09:42:00 -0300 Message-Id: <1351773720-22639-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 The sparse warning is: "drivers/media/usb/stkwebcam/stk-webcam.c:59:5: warning: symbol 'first_init' was not declared. Should it be static?" Declare variable 'first_init' as static and local to the function. Found by Hans Verkuil's daily build. Tested by compilation only. Cc: Andrea Anacleto Cc: Arvydas Sidorenko Cc: Jaime Velasco Juan Cc: Hans de Goede Signed-off-by: Ezequiel Garcia --- Ouch, there doesn't seem to be an active maintainer for this. If anyone has a device and can give it a try, it would be nice. The change is pretty simple anyway. Also, why the heck do we need this first_init? To prevent the led from blinking on udev first open? drivers/media/usb/stkwebcam/stk-webcam.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c index 86a0fc5..5d3c032 100644 --- a/drivers/media/usb/stkwebcam/stk-webcam.c +++ b/drivers/media/usb/stkwebcam/stk-webcam.c @@ -54,10 +54,6 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Jaime Velasco Juan and Nicolas VIVIEN"); MODULE_DESCRIPTION("Syntek DC1125 webcam driver"); - -/* bool for webcam LED management */ -int first_init = 1; - /* Some cameras have audio interfaces, we aren't interested in those */ static struct usb_device_id stkwebcam_table[] = { { USB_DEVICE_AND_INTERFACE_INFO(0x174f, 0xa311, 0xff, 0xff, 0xff) }, @@ -554,6 +550,7 @@ static void stk_free_buffers(struct stk_camera *dev) static int v4l_stk_open(struct file *fp) { + static int first_init = 1; /* webcam LED management */ struct stk_camera *dev; struct video_device *vdev;