From patchwork Thu Oct 4 09:29:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 1545821 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by patchwork2.kernel.org (Postfix) with ESMTP id A8B74DF238 for ; Thu, 4 Oct 2012 09:33:08 +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 q949V4FP016537; Thu, 4 Oct 2012 04:31:04 -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 q949V4Nk011767; Thu, 4 Oct 2012 04:31:04 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Thu, 4 Oct 2012 04:31:04 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q949V4Hx010142; Thu, 4 Oct 2012 04:31:04 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 0D58F80628; Thu, 4 Oct 2012 04:31:04 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id AF9D680626 for ; Thu, 4 Oct 2012 04:31:01 -0500 (CDT) Received: from medina.ext.ti.com (medina.ext.ti.com [192.91.81.31]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id q949V104006484 for ; Thu, 4 Oct 2012 04:31:01 -0500 (CDT) Received: from psmtp.com (na3sys009amx209.postini.com [74.125.149.49]) by medina.ext.ti.com (8.13.7/8.13.7) with SMTP id q949V0Pb011542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 4 Oct 2012 04:31:01 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]) (using TLSv1) by na3sys009amx209.postini.com ([74.125.148.10]) with SMTP; Thu, 04 Oct 2012 02:31:01 PDT Received: by mail-pb0-f45.google.com with SMTP id rp2so408918pbb.4 for ; Thu, 04 Oct 2012 02:31:00 -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:in-reply-to:references; bh=wJRsD62Gm2sDneV83w3ju3mrleFxa4fFpEMmDjvUATk=; b=pRR6jda+hcCCGQS7eL6XMIr0CmLBs1ClrpQkhAiGoh+Vr7vgDkzSiyhSf4b6QULvdS aicd/nXotwwr5GPTgHsGKBEklrpVZz/fACCX7UTHg076OqZunZx+c/VQO/YZo8aq/XeS BdY4CaH6h7gJ2l5gk0DkPc+rZIelCLbe2gWUcdx5XECYTH8YZ9TFaPd6+vWWdIUL6aCK 32G4DDZDk0F155xEb/6To/n2T3wi0gnd99HA53Yh/86dMgEj7YPc5amqzBDHyDJxlBBZ Hioaqg5e24QM/Ju3Kj85E71zwjbx1TlZf4L+xDhy/ywSVBBd/c3sl8/SlN0gmDYK0kpK yyzQ== Received: by 10.66.86.161 with SMTP id q1mr9996978paz.40.1349343060193; Thu, 04 Oct 2012 02:31:00 -0700 (PDT) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id py9sm4080935pbb.20.2012.10.04.02.30.53 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Oct 2012 02:30:59 -0700 (PDT) From: Prabhakar To: LMML Subject: [PATCH v3] media: davinci: vpif: set device capabilities Date: Thu, 4 Oct 2012 14:59:58 +0530 Message-ID: <1349342998-31804-2-git-send-email-prabhakar.lad@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1349342998-31804-1-git-send-email-prabhakar.lad@ti.com> References: <1349342998-31804-1-git-send-email-prabhakar.lad@ti.com> X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:77.89906/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 , Hans Verkuil , LKML 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 Acked-by: Hans Verkuil --- Changes for v3: 1: Removed READWRITE flag for device_caps pointed by Hans. Changes for v2: 1: Change the bus_info and driver to proper values, pointed by Hans. drivers/media/platform/davinci/vpif_capture.c | 8 +++++--- drivers/media/platform/davinci/vpif_display.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index cabd5a2..fcabc02 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -1635,9 +1635,11 @@ 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; + 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 7f20ca5..b716fbd 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -827,9 +827,11 @@ 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; + 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;