From patchwork Fri Oct 20 21:49:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo F. Padovan" X-Patchwork-Id: 45076 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5fG3-0001yJ-JT; Fri, 20 Oct 2017 21:55:12 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753053AbdJTVue (ORCPT + 1 other); Fri, 20 Oct 2017 17:50:34 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:47286 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753015AbdJTVuc (ORCPT ); Fri, 20 Oct 2017 17:50:32 -0400 Received: by mail-qt0-f193.google.com with SMTP id z50so20164537qtj.4; Fri, 20 Oct 2017 14:50:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=F1+/EKzxlZJG6fs7pqW2XkyI8hF/UKJolAQ7xOXLLkw=; b=YB67V21LpwGXVlKfGSNeA7R0EUbaFKdttb0OH3Gvjvanp+aTHNCg7q5b8JJXuYTwOD GqG9AFdSuLPx4oUpPiM0FOg08t3GPHYFZ4/M952dzZDZdbCqWUKInicT/VKBUyLpHyxE LFKXk33f+VF22vRQSOcB8sgr9E9RhIbSnwYhv4rWi4B5y6D4FJgSmcom7GDKpx6pW8Pa x47C9L33gp5JTP50+liVgh80qqPeDKCkWAhSN6M5BKYTLeTRBn5R9dkb/p23T2skBuzV qJs+QfQ3w6zGZHWmwUGSVNdPS8/bKEGmABjRxHF+TIYGdunlk1I8HjvWfbp28j6DeYAR Wa4w== X-Gm-Message-State: AMCzsaWl+JCiF5/CbXZNV3FgvFKupaOjx0C2jcMSu62Aqj1OU+P91CVS kEhbIybNQ6Sz8pVRvuIWXb75h1vJ X-Google-Smtp-Source: ABhQp+SaMuJ3S4saxuFlDAU32RwLmVxA5tT4UReLlptB8tEN+SFKMqOrzwCWZTGbjdEn15NgiHMNsw== X-Received: by 10.237.42.43 with SMTP id c40mr9206528qtd.322.1508536231587; Fri, 20 Oct 2017 14:50:31 -0700 (PDT) Received: from localhost.localdomain (189-19-125-192.dsl.telesp.net.br. [189.19.125.192]) by smtp.gmail.com with ESMTPSA id j4sm1167039qkf.75.2017.10.20.14.50.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2017 14:50:31 -0700 (PDT) From: Gustavo Padovan To: linux-media@vger.kernel.org Cc: Hans Verkuil , Mauro Carvalho Chehab , Shuah Khan , Pawel Osciak , Alexandre Courbot , Sakari Ailus , Brian Starkey , linux-kernel@vger.kernel.org, Gustavo Padovan Subject: [RFC v4 03/17] [media] v4l: use v4l2_subscribe_event_v4l2() on drivers Date: Fri, 20 Oct 2017 19:49:58 -0200 Message-Id: <20171020215012.20646-4-gustavo@padovan.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171020215012.20646-1-gustavo@padovan.org> References: <20171020215012.20646-1-gustavo@padovan.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Gustavo Padovan Driver that implement their own .vidioc_subscribe_event function should be using v4l2_subscribe_event_v4l2() instead of v4l2_ctrl_subscribe_event(). Signed-off-by: Gustavo Padovan --- drivers/media/pci/cobalt/cobalt-v4l2.c | 2 +- drivers/media/pci/ivtv/ivtv-ioctl.c | 2 +- drivers/media/pci/tw5864/tw5864-video.c | 2 +- drivers/media/platform/coda/coda-common.c | 2 +- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 2 +- drivers/media/platform/qcom/venus/vdec.c | 4 +--- drivers/media/platform/rcar-vin/rcar-v4l2.c | 2 +- drivers/media/platform/vivid/vivid-vid-out.c | 2 +- drivers/media/usb/go7007/go7007-v4l2.c | 2 +- drivers/media/usb/uvc/uvc_v4l2.c | 2 +- 10 files changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c index def4a3b37084..7b79daa09416 100644 --- a/drivers/media/pci/cobalt/cobalt-v4l2.c +++ b/drivers/media/pci/cobalt/cobalt-v4l2.c @@ -1071,7 +1071,7 @@ static int cobalt_subscribe_event(struct v4l2_fh *fh, case V4L2_EVENT_SOURCE_CHANGE: return v4l2_event_subscribe(fh, sub, 4, NULL); } - return v4l2_ctrl_subscribe_event(fh, sub); + return v4l2_subscribe_event_v4l2(fh, sub); } static int cobalt_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a) diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index 670462d195b5..4d76a433fcf3 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c @@ -1507,7 +1507,7 @@ static int ivtv_subscribe_event(struct v4l2_fh *fh, const struct v4l2_event_subs case V4L2_EVENT_EOS: return v4l2_event_subscribe(fh, sub, 0, NULL); default: - return v4l2_ctrl_subscribe_event(fh, sub); + return v4l2_subscribe_event_v4l2(fh, sub); } } diff --git a/drivers/media/pci/tw5864/tw5864-video.c b/drivers/media/pci/tw5864/tw5864-video.c index e7bd2b8484e3..67fa883bed3c 100644 --- a/drivers/media/pci/tw5864/tw5864-video.c +++ b/drivers/media/pci/tw5864/tw5864-video.c @@ -671,7 +671,7 @@ static int tw5864_subscribe_event(struct v4l2_fh *fh, */ return v4l2_event_subscribe(fh, sub, 30, NULL); default: - return v4l2_ctrl_subscribe_event(fh, sub); + return v4l2_subscribe_event_v4l2(fh, sub); } } diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 15eb5dc4dff9..897c6939ab0f 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -1085,7 +1085,7 @@ static int coda_subscribe_event(struct v4l2_fh *fh, case V4L2_EVENT_EOS: return v4l2_event_subscribe(fh, sub, 0, NULL); default: - return v4l2_ctrl_subscribe_event(fh, sub); + return v4l2_subscribe_event_v4l2(fh, sub); } } diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c index 843510979ad8..a9f80db14b47 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c @@ -629,7 +629,7 @@ static int vidioc_vdec_subscribe_evt(struct v4l2_fh *fh, case V4L2_EVENT_SOURCE_CHANGE: return v4l2_src_change_event_subscribe(fh, sub); default: - return v4l2_ctrl_subscribe_event(fh, sub); + return v4l2_subscribe_event_v4l2(fh, sub); } } diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index da611a5eb670..ccf9b778dcf9 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -459,10 +459,8 @@ static int vdec_subscribe_event(struct v4l2_fh *fh, return v4l2_event_subscribe(fh, sub, 2, NULL); case V4L2_EVENT_SOURCE_CHANGE: return v4l2_src_change_event_subscribe(fh, sub); - case V4L2_EVENT_CTRL: - return v4l2_ctrl_subscribe_event(fh, sub); default: - return -EINVAL; + return v4l2_subscribe_event_v4l2(fh, sub); } } diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c index dd37ea811680..153622e0d42f 100644 --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c @@ -542,7 +542,7 @@ static int rvin_subscribe_event(struct v4l2_fh *fh, case V4L2_EVENT_SOURCE_CHANGE: return v4l2_event_subscribe(fh, sub, 4, NULL); } - return v4l2_ctrl_subscribe_event(fh, sub); + return v4l2_subscribe_event_v4l2(fh, sub); } static int rvin_enum_dv_timings(struct file *file, void *priv_fh, diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c index 0b1b6218ede8..f420e9c9d1f6 100644 --- a/drivers/media/platform/vivid/vivid-vid-out.c +++ b/drivers/media/platform/vivid/vivid-vid-out.c @@ -1183,7 +1183,7 @@ int vidioc_subscribe_event(struct v4l2_fh *fh, return v4l2_src_change_event_subscribe(fh, sub); break; default: - return v4l2_ctrl_subscribe_event(fh, sub); + return v4l2_subscribe_event_v4l2(fh, sub); } return -EINVAL; } diff --git a/drivers/media/usb/go7007/go7007-v4l2.c b/drivers/media/usb/go7007/go7007-v4l2.c index 98cd57eaf36a..a0343a4b4dbc 100644 --- a/drivers/media/usb/go7007/go7007-v4l2.c +++ b/drivers/media/usb/go7007/go7007-v4l2.c @@ -797,7 +797,7 @@ static int vidioc_subscribe_event(struct v4l2_fh *fh, * stored. */ return v4l2_event_subscribe(fh, sub, 30, NULL); default: - return v4l2_ctrl_subscribe_event(fh, sub); + return v4l2_subscribe_event_v4l2(fh, sub); } } diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c index 3e7e283a44a8..943c6bb5548b 100644 --- a/drivers/media/usb/uvc/uvc_v4l2.c +++ b/drivers/media/usb/uvc/uvc_v4l2.c @@ -1240,7 +1240,7 @@ static int uvc_ioctl_subscribe_event(struct v4l2_fh *fh, case V4L2_EVENT_CTRL: return v4l2_event_subscribe(fh, sub, 0, &uvc_ctrl_sub_ev_ops); default: - return -EINVAL; + return v4l2_subscribe_event_v4l2(fh, sub); } }