From patchwork Thu May 9 15:36:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 2544411 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 C4F943FD4E for ; Thu, 9 May 2013 15:37:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755714Ab3EIPhP (ORCPT ); Thu, 9 May 2013 11:37:15 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:60565 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755573Ab3EIPhM (ORCPT ); Thu, 9 May 2013 11:37:12 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MMJ00EQ1FDP2XF0@mailout4.samsung.com> for linux-media@vger.kernel.org; Fri, 10 May 2013 00:37:11 +0900 (KST) X-AuditID: cbfee61a-b7fd56d0000022fd-f6-518bc2a70014 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 17.81.08957.7A2CB815; Fri, 10 May 2013 00:37:11 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MMJ00AHUFDDXM80@mmp2.samsung.com>; Fri, 10 May 2013 00:37:11 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: hj210.choi@samsung.com, dh09.lee@samsung.com, a.hajda@samsung.com, shaik.ameer@samsung.com, arun.kk@samsung.com, Sylwester Nawrocki , Kyungmin Park Subject: [PATCH 02/13] exynos4-is: Correct querycap ioctl handling at fimc-lite driver Date: Thu, 09 May 2013 17:36:34 +0200 Message-id: <1368113805-20233-3-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1368113805-20233-1-git-send-email-s.nawrocki@samsung.com> References: <1368113805-20233-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupgluLIzCtJLcpLzFFi42I5/e+xoO7yQ92BBrM2KFvcWneO1eLjqdus FtfP21k83niN2eJs0xt2i54NW1ktDr9pZ7U48nA3uwOHR9+WVYwenzfJBTBFcdmkpOZklqUW 6dslcGW8nL+FqeAjX8WGddNZGxif83QxcnJICJhIzL7VwAhhi0lcuLeeDcQWEpjOKPHsm1cX IxeQ3cEk8ezZDbAiNgFDid6jfWC2iIC8xJPeG2wgRcwCFxkl1p/YywSSEBaIkLj59x9YEYuA qsTSru9gcV4BN4kNU5YAxTmAtilIzJlkAxLmFHCX6Pzczg6x2E1i1pIrjBMYeRcwMqxiFE0t SC4oTkrPNdQrTswtLs1L10vOz93ECA6fZ1I7GFc2WBxiFOBgVOLh9djTHSjEmlhWXJl7iFGC g1lJhHfDBqAQb0piZVVqUX58UWlOavEhRmkOFiVx3gOt1oFCAumJJanZqakFqUUwWSYOTqkG xiiHpetEDHyvnTYTn7K05snXM8J3tp0TN2irPdph+I3lzIrL7p18fYGrph+YrfrevYxH0LKw rZX5Ld+9HUrpV5+elfu0IY33fH213bQVv7Lm5L5S7C1dI94qsmteSLjJM71QuZrKfHktQclL HBndc3YUFnGx5LTPybikwSfBVSkSYFn7OKJFiaU4I9FQi7moOBEAP38BABsCAAA= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fill in properly bus_info and card fields and set device_caps. The querycap ioctl handler is renamed for consistency with the other ioctls. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- drivers/media/platform/exynos4-is/fimc-lite.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index 8af8add..c57fa65 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -637,13 +637,18 @@ static void fimc_lite_try_compose(struct fimc_lite *fimc, struct v4l2_rect *r) /* * Video node ioctl operations */ -static int fimc_vidioc_querycap_capture(struct file *file, void *priv, +static int fimc_lite_querycap(struct file *file, void *priv, struct v4l2_capability *cap) { + struct fimc_lite *fimc = video_drvdata(file); + strlcpy(cap->driver, FIMC_LITE_DRV_NAME, sizeof(cap->driver)); - cap->bus_info[0] = 0; - cap->card[0] = 0; - cap->capabilities = V4L2_CAP_STREAMING; + strlcpy(cap->card, FIMC_LITE_DRV_NAME, sizeof(cap->card)); + snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s", + dev_name(&fimc->pdev->dev)); + + cap->device_caps = V4L2_CAP_STREAMING; + cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } @@ -938,7 +943,7 @@ static int fimc_lite_s_selection(struct file *file, void *fh, } static const struct v4l2_ioctl_ops fimc_lite_ioctl_ops = { - .vidioc_querycap = fimc_vidioc_querycap_capture, + .vidioc_querycap = fimc_lite_querycap, .vidioc_enum_fmt_vid_cap_mplane = fimc_lite_enum_fmt_mplane, .vidioc_try_fmt_vid_cap_mplane = fimc_lite_try_fmt_mplane, .vidioc_s_fmt_vid_cap_mplane = fimc_lite_s_fmt_mplane,