From patchwork Mon Jul 15 06:36:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 18352 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F311925E23 for ; Mon, 15 Jul 2013 06:52:24 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id z11sf11939555wgg.7 for ; Sun, 14 Jul 2013 23:52:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=sHcznIv4Do9WfEKlA0aW6rDoDw3oNAnWlM9vYYBoWpc=; b=diBbCE1Y0oVoZs/rv5q0g6KwDAy4Qi93xo1k8FgqlFlPT0PGXTDrD3w4Ljx9bPFis2 Ydrk6ux/y1MxLtPdyZEMfw69C+EcvNqhmCS1XD57HmKDKBcBvlB+FDGio1qCrffCRTEJ Uk6r7NlOqQo1W4ILmdsqcrW+QKHtsrVDx/vVeeYdLuGGNJNCUrN6k1D91sGO3fXP1pGh WoHYXwqF5D27eGspLaj8+7THkMryQ13hTo+LYZ53A4fGmwbsZMcYR+9Ig1W/rCikc2Te W5sk3AxzjJQkRYgnZ0oYlkoPRfCZnsmOGKjpso3KYnDOYWWCyfLKJL8PiaasqGUB5eVh Ll2Q== X-Received: by 10.180.37.143 with SMTP id y15mr5746393wij.2.1373871144044; Sun, 14 Jul 2013 23:52:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.35.38 with SMTP id e6ls562489wij.9.canary; Sun, 14 Jul 2013 23:52:23 -0700 (PDT) X-Received: by 10.194.8.163 with SMTP id s3mr30942575wja.41.1373871143719; Sun, 14 Jul 2013 23:52:23 -0700 (PDT) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id ca20si3437534wib.30.2013.07.14.23.52.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 14 Jul 2013 23:52:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id db10so9454580veb.40 for ; Sun, 14 Jul 2013 23:52:22 -0700 (PDT) X-Received: by 10.221.31.130 with SMTP id sg2mr8385979vcb.86.1373871142639; Sun, 14 Jul 2013 23:52:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.149.77 with SMTP id s13csp54744vcv; Sun, 14 Jul 2013 23:52:22 -0700 (PDT) X-Received: by 10.66.166.232 with SMTP id zj8mr54125933pab.139.1373871141474; Sun, 14 Jul 2013 23:52:21 -0700 (PDT) Received: from mail-pb0-f47.google.com (mail-pb0-f47.google.com [209.85.160.47]) by mx.google.com with ESMTPS id gk2si27040664pbb.349.2013.07.14.23.52.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 14 Jul 2013 23:52:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.47 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.47; Received: by mail-pb0-f47.google.com with SMTP id rr13so10926578pbb.6 for ; Sun, 14 Jul 2013 23:52:21 -0700 (PDT) X-Received: by 10.66.188.2 with SMTP id fw2mr54655184pac.91.1373871140937; Sun, 14 Jul 2013 23:52:20 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id qb15sm62700301pab.13.2013.07.14.23.52.16 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 14 Jul 2013 23:52:20 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: k.debski@samsung.com, s.nawrocki@samsung.com, sachin.kamat@linaro.org, patches@linaro.org, Hans Verkuil Subject: [PATCH 1/1] [media] s5p-g2d: Fix registration failure Date: Mon, 15 Jul 2013 12:06:23 +0530 Message-Id: <1373870183-28063-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQnMSPtcfFkoZ8zqW+PTcc8dclYSB1xXnob/qeBDJ8Fl5GT1NTOa0yCb9tD1g9SkpkM/MtjN X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Commit 1c1d86a1ea ("[media] v4l2: always require v4l2_dev, rename parent to dev_parent") expects v4l2_dev to be always set. It converted most of the drivers using the parent field of video_device to v4l2_dev field. G2D driver did not set the parent field. Hence it got left out. Without this patch we get the following boot warning and G2D driver fails to register the video device. WARNING: CPU: 0 PID: 1 at drivers/media/v4l2-core/v4l2-dev.c:775 __video_register_device+0xfc0/0x1028() Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.11.0-rc1-00001-g1c3e372-dirty #9 [] (unwind_backtrace+0x0/0xf4) from [] (show_stack+0x10/0x14) [] (show_stack+0x10/0x14) from [] (dump_stack+0x7c/0xb0) [] (dump_stack+0x7c/0xb0) from [] (warn_slowpath_common+0x6c/0x88) [] (warn_slowpath_common+0x6c/0x88) from [] (warn_slowpath_null+0x1c/0x24) [] (warn_slowpath_null+0x1c/0x24) from [] (__video_register_device+0xfc0/0x1028) [] (__video_register_device+0xfc0/0x1028) from [] (g2d_probe+0x1f8/0x398) [] (g2d_probe+0x1f8/0x398) from [] (platform_drv_probe+0x14/0x18) [] (platform_drv_probe+0x14/0x18) from [] (driver_probe_device+0x108/0x220) [] (driver_probe_device+0x108/0x220) from [] (__driver_attach+0x8c/0x90) [] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x60/0x94) [] (bus_for_each_dev+0x60/0x94) from [] (bus_add_driver+0x1c0/0x24c) [] (bus_add_driver+0x1c0/0x24c) from [] (driver_register+0x78/0x140) [] (driver_register+0x78/0x140) from [] (do_one_initcall+0xf8/0x144) [] (do_one_initcall+0xf8/0x144) from [] (kernel_init_freeable+0x13c/0x1d8) [] (kernel_init_freeable+0x13c/0x1d8) from [] (kernel_init+0xc/0x160) [] (kernel_init+0xc/0x160) from [] (ret_from_fork+0x14/0x3c) ---[ end trace 4e0ec028b0028e02 ]--- s5p-g2d 12800000.g2d: Failed to register video device s5p-g2d: probe of 12800000.g2d failed with error -22 Signed-off-by: Sachin Kamat Cc: Hans Verkuil Acked-by: Kamil Debski --- drivers/media/platform/s5p-g2d/g2d.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c index 553d87e..fd6289d 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c @@ -784,6 +784,7 @@ static int g2d_probe(struct platform_device *pdev) } *vfd = g2d_videodev; vfd->lock = &dev->mutex; + vfd->v4l2_dev = &dev->v4l2_dev; ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0); if (ret) { v4l2_err(&dev->v4l2_dev, "Failed to register video device\n");