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: 1504441 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E6BB9DF24C for ; Tue, 25 Sep 2012 14:22:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753870Ab2IYOWT (ORCPT ); Tue, 25 Sep 2012 10:22:19 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:65305 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753411Ab2IYOWS (ORCPT ); Tue, 25 Sep 2012 10:22:18 -0400 Received: by pbbrr4 with SMTP id rr4so186863pbb.19 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 Cc: DLOS , Manjunath Hadli , Mauro Carvalho Chehab , VGER , Laurent Pinchart , "Lad, Prabhakar" , Hans Verkuil 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 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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;