From patchwork Mon Sep 28 22:27:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 7281291 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1D0D9BEEA4 for ; Mon, 28 Sep 2015 22:31:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 50DB620713 for ; Mon, 28 Sep 2015 22:31:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6358B206DF for ; Mon, 28 Sep 2015 22:31:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753733AbbI1WbO (ORCPT ); Mon, 28 Sep 2015 18:31:14 -0400 Received: from mail-qg0-f50.google.com ([209.85.192.50]:35332 "EHLO mail-qg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750901AbbI1WbK (ORCPT ); Mon, 28 Sep 2015 18:31:10 -0400 Received: by qgt47 with SMTP id 47so134055641qgt.2 for ; Mon, 28 Sep 2015 15:31:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DIqcm/gRhSoh7aYc5HxS5Gzf5pKtcntwnrNAkOZ4Xds=; b=Seg9qhBz9YGYgxGW/O3Ns7pjWWFRkRcB8zt1vmmzo/Vzd+bqG8NPGKQ1T6ci2ojM38 Q97Thxj0l4zasblCOpRveQTgTI7C1+Zb0Kw/7+XREuCg9gwl1pYiG0EEvx2R/YBYon// FKcUAfJAXZaXXAXdXKkK4cQ9VuTowrGxQn6DYoL15RSYxasbBCZ1tGcC8orPuUiVj1GG Q4AjLjvGxmBHg4VEtRTk15ddF3NhXRE9IfWKLNTMoCnDuKGJR147iWNwIla5ORckudLM SGRQd8mvrQ1Aml9tuRAE1g355f5UW1NGDLR+e9WbrBuCulcNfc93rXFviVtqx70gh9ai 8Ixw== X-Gm-Message-State: ALoCoQnaZE0REar4G/aK4s315V9UVRXl/eH3u/4C7H7z9GWOFqbWpTOVUOKtdZ7QsjkpS90vVRhw X-Received: by 10.140.216.202 with SMTP id m193mr27649476qhb.30.1443479469587; Mon, 28 Sep 2015 15:31:09 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.156]) by smtp.gmail.com with ESMTPSA id s52sm8048678qge.19.2015.09.28.15.31.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Sep 2015 15:31:08 -0700 (PDT) From: Ezequiel Garcia To: Cc: Hans Verkuil , Ezequiel Garcia Subject: [PATCH] vivid: Add an option to configure the maximum number of devices Date: Mon, 28 Sep 2015 19:27:07 -0300 Message-Id: <1443479227-22060-1-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.5.2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 The vivid driver currently has a hard-coded limit of 64 devices, however there's nothing that prevents the creation of even more devices. This commit adds a new driver option (which defaults to 64) to allow this maximum number to be configurable. Signed-off-by: Ezequiel Garcia --- drivers/media/platform/vivid/Kconfig | 8 ++++++++ drivers/media/platform/vivid/vivid-core.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/vivid/Kconfig b/drivers/media/platform/vivid/Kconfig index c3090932f06d..0885e93ad436 100644 --- a/drivers/media/platform/vivid/Kconfig +++ b/drivers/media/platform/vivid/Kconfig @@ -20,3 +20,11 @@ config VIDEO_VIVID Say Y here if you want to test video apps or debug V4L devices. When in doubt, say N. + +config VIDEO_VIVID_MAX_DEVS + int "Maximum number of devices" + depends on VIDEO_VIVID + default "64" + ---help--- + This allows you to specify the maximum number of devices supported + by the vivid driver. diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/platform/vivid/vivid-core.c index c63e798e10b7..b30c00ed5f38 100644 --- a/drivers/media/platform/vivid/vivid-core.c +++ b/drivers/media/platform/vivid/vivid-core.c @@ -51,7 +51,7 @@ #define VIVID_MODULE_NAME "vivid" /* The maximum number of vivid devices */ -#define VIVID_MAX_DEVS 64 +#define VIVID_MAX_DEVS CONFIG_VIDEO_VIVID_MAX_DEVS MODULE_DESCRIPTION("Virtual Video Test Driver"); MODULE_AUTHOR("Hans Verkuil");