From patchwork Fri Jun 24 11:28:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 9197337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AB7A060754 for ; Fri, 24 Jun 2016 11:29:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D07B28498 for ; Fri, 24 Jun 2016 11:29:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91B612849E; Fri, 24 Jun 2016 11:29:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2778028498 for ; Fri, 24 Jun 2016 11:29:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750978AbcFXL3D (ORCPT ); Fri, 24 Jun 2016 07:29:03 -0400 Received: from mout.gmx.net ([212.227.17.22]:60479 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750966AbcFXL3B (ORCPT ); Fri, 24 Jun 2016 07:29:01 -0400 Received: from axis700.grange ([89.0.126.241]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0LwrS8-1bRcZN0KVc-016PdS; Fri, 24 Jun 2016 13:28:57 +0200 Received: by axis700.grange (Postfix, from userid 1000) id C479DFF8B; Fri, 24 Jun 2016 13:28:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id C289713EC5; Fri, 24 Jun 2016 13:28:55 +0200 (CEST) Date: Fri, 24 Jun 2016 13:28:55 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: Linux Media Mailing List cc: Laurent Pinchart Subject: [PATCH 1/3] uvcvideo: initialise the entity function field In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Provags-ID: V03:K0:qICznQANRY1u81VZR8iGlYIpEdx+w/3yNQx/GJNZN+TG5BNSPBD aTsrkZ+PjZmMoYwKEB/6kUHoVYHFAv5IaQChe/N8tyx6eIOPO7sb0pqr7ZeHIS7LQsWQHbn fVV//KlmLKgjU5st6/03b+piaGdNwDimcGDw0y43k74bZ7LnRhWFpzIlwUWmW2Xb8ojz1JZ yB5U0wrjXVCqFSNC6G7Bg== X-UI-Out-Filterresults: notjunk:1; V01:K0:gcXepSUrkd8=:vZD5OwR2PFIrFmGlyTKMLX gqVPfVr54eORH8r4Sc0XnJ7rVC3EsHGPM1+5JTsJPOaOjiZXXWX6dqXiTdDp1osTEIMs0pv7a PKZ6MVURAlqb/WjAFGaK1XE1awtpEX2EViZ4BJ2Z2fW6XpvhnB7N1HfCFQ5XSN9qdy3bwHwST xOF9EmaieFfW27RUl5zM9F5uTanhUr/A/2MZQxrvysquCcGZw2GtQyWoroQJkQFxMmVhgxUd0 pNfOZvtMWZDUYTbzbyZXh1UtLzzl3ZaD8FQlYAr8TqesAqjhoYrCCe9+njRcel38SfSHxjg2U z6kZy2KhWkgk6JFtEBCnWeubRV3v+JQmtAmyiqBMshfqjgoUaSAIhVsHXVS5xgCwUcNY3q2IP ee3tG0PKydKWyjm2YxedUhM4jNbwTr+0zdaocVAQSJR1T7el9dnP/gccQe1aEER353YLqwpcd mWNPU0PyoVGYn9wMbyLdMwhxSTX2pulX8mN3AL3ZulEbSDY/3mRrJrhGN9Qiqjsll2/a7yVG2 Mc9A20QBNOEPCMK1ktG0M9RXGwx0YlH4Ar3kdhnIbuAgEtP0cuZ1i076wS8ZEt2lwdBEfHViR iYP9GbdrUKqCqoEX28wd4b1pN39qw4aUWgpgq9lMTpzmkaFca8S8Wm5DF+2WWd1zzNO11LFu8 8urfmLEXzU1gGWQCJNrit8RAdxRhcxgkd9inuDZKix3cM7cI1RjOjsYJeXk9C4hBz8kmeuJXA pGf6Rb22oc4/RIJ7mwGcrdwzpKcq7Kw0nJEVuwJRhzt4Hir9DO9PGDjMCoH1X5iP9MU2vOKGT TRFL2aT Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since a recent commit: [media] media-device: move media entity register/unregister functions drivers have to set entity function before registering an entity. Fix the uvcvideo driver to comply with this. Signed-off-by: Guennadi Liakhovetski --- drivers/media/usb/uvc/uvc_entity.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_entity.c b/drivers/media/usb/uvc/uvc_entity.c index ac386bb..d93f413 100644 --- a/drivers/media/usb/uvc/uvc_entity.c +++ b/drivers/media/usb/uvc/uvc_entity.c @@ -88,6 +88,11 @@ static int uvc_mc_init_entity(struct uvc_video_chain *chain, if (ret < 0) return ret; + if (UVC_ENTITY_TYPE(entity) == UVC_ITT_CAMERA) + entity->subdev.entity.function = MEDIA_ENT_F_CAM_SENSOR; + else + entity->subdev.entity.function = MEDIA_ENT_F_IO_V4L; + ret = v4l2_device_register_subdev(&chain->dev->vdev, &entity->subdev); } else if (entity->vdev != NULL) {