From patchwork Tue Sep 25 14:21:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 1504451 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by patchwork1.kernel.org (Postfix) with ESMTP id D77FB3FC71 for ; Tue, 25 Sep 2012 14:24:04 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8PEMMFc003720; Tue, 25 Sep 2012 09:22:22 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8PEMLU7006745; Tue, 25 Sep 2012 09:22:21 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Tue, 25 Sep 2012 09:22:21 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8PEMLJ1017422; Tue, 25 Sep 2012 09:22:21 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id A3DD280627; Tue, 25 Sep 2012 09:22:21 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 55D7680626 for ; Tue, 25 Sep 2012 09:22:20 -0500 (CDT) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8PEMKFn001787 for ; Tue, 25 Sep 2012 09:22:20 -0500 (CDT) Received: from psmtp.com (na3sys009amx238.postini.com [74.125.149.122]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id q8PEMIWB005100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 25 Sep 2012 09:22:19 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]) (using TLSv1) by na3sys009amx238.postini.com ([74.125.148.10]) with SMTP; Tue, 25 Sep 2012 07:22:19 PDT Received: by pbbrp2 with SMTP id rp2so192409pbb.4 for ; Tue, 25 Sep 2012 07:22:18 -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=UuSXowmeC6hDufnE03sb4USHPErQsh2z55rydGG27k4=; b=qXR4lE3cI57zVlkFdngw5N7vLzenqXEMCB/G9V/fjhCyar5c+hcRVJGH1fnYl+nf37 r+XTNy4JbTihQjLqWxhdOn1WdfSCkjqdHdftEtjcVF6ir2kqRhDds+IaAr90GD86TPnF 16TVfiqVXcLM5amGNwQUWhuHRWWdUzKINnpjvZXMobAyjqKjrdFAWVa2nFvtTepvKPKg vYxIbwax+cUOoBMDRj/29kMnY2QAZQgi1d4ziIg33I0EJ9E3zMXEpHO69TLeF6epW5Bc POslSTx4h1Tf5GwXQdK+fO/3dzswJO4G/hkoXJZ4kEdFt+zu8t/Q4ycjCm0TOw0v0uqq zYXA== Received: by 10.68.234.7 with SMTP id ua7mr47154425pbc.91.1348582938155; Tue, 25 Sep 2012 07:22:18 -0700 (PDT) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id it6sm411988pbc.14.2012.09.25.07.22.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 07:22:17 -0700 (PDT) From: Prabhakar To: LMML Subject: [PATCH v2] media: davinci: vpif: set device capabilities Date: Tue, 25 Sep 2012 19:51:55 +0530 Message-ID: <1348582915-22878-1-git-send-email-prabhakar.lad@ti.com> X-Mailer: git-send-email 1.7.4.1 X-pstn-levels: (S:66.45100/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-dkim: 1 skipped:not-enabled X-pstn-settings: 2 (0.5000:0.0050) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [82/3] CC: DLOS , VGER , Hans Verkuil , Mauro Carvalho Chehab X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Lad, Prabhakar set device_caps and also change the driver and bus_info to proper values as per standard. Signed-off-by: Lad, Prabhakar Signed-off-by: Manjunath Hadli Cc: Hans Verkuil --- Changes for v2: 1: Change the bus_info and driver to proper values, pointed by Hans. drivers/media/platform/davinci/vpif_capture.c | 9 ++++++--- drivers/media/platform/davinci/vpif_display.c | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index 4828888..cb70e98 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -1630,9 +1630,12 @@ static int vpif_querycap(struct file *file, void *priv, { struct vpif_capture_config *config = vpif_dev->platform_data; - cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; - strlcpy(cap->driver, "vpif capture", sizeof(cap->driver)); - strlcpy(cap->bus_info, "VPIF Platform", sizeof(cap->bus_info)); + cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING | + V4L2_CAP_READWRITE; + cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; + snprintf(cap->driver, sizeof(cap->driver), "%s", dev_name(vpif_dev)); + snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s", + dev_name(vpif_dev)); strlcpy(cap->card, config->card_name, sizeof(cap->card)); return 0; diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index d94b8a2..411b547 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -827,9 +827,12 @@ static int vpif_querycap(struct file *file, void *priv, { struct vpif_display_config *config = vpif_dev->platform_data; - cap->capabilities = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; - strlcpy(cap->driver, "vpif display", sizeof(cap->driver)); - strlcpy(cap->bus_info, "Platform", sizeof(cap->bus_info)); + cap->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING | + V4L2_CAP_READWRITE; + cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; + snprintf(cap->driver, sizeof(cap->driver), "%s", dev_name(vpif_dev)); + snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s", + dev_name(vpif_dev)); strlcpy(cap->card, config->card_name, sizeof(cap->card)); return 0;