From patchwork Wed Feb 15 17:55:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9574651 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 0548E6045F for ; Wed, 15 Feb 2017 17:57:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E389C20564 for ; Wed, 15 Feb 2017 17:57:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D52D427C2D; Wed, 15 Feb 2017 17:57:08 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable 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 7301020564 for ; Wed, 15 Feb 2017 17:57:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752485AbdBORzp (ORCPT ); Wed, 15 Feb 2017 12:55:45 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:34537 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752479AbdBORzn (ORCPT ); Wed, 15 Feb 2017 12:55:43 -0500 Received: by mail-qt0-f196.google.com with SMTP id w20so21985626qtb.1; Wed, 15 Feb 2017 09:55:42 -0800 (PST) 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=K0Bh2UrIOhw5/qiaM5+YvSJ/4xDqjJWWrlWdP1m+sMU=; b=QXBhfCbMeqwmK9dTSn7013o1OhmurRx2Y4b7HJ5Szj4z0APIUFXcBgI5d+CXEcd/f5 H/eTkv9l2BceNSDYmbBW2iwBxiIez7aQT8eIUiPbEWfVtNKjH1sDVrKJy9QCRQVTCdEE TOeNKnA6uxib/dQbG16wxy4jycU3DkaPZ+sbxMTKaiU/luorrCzdDaxGiYEtOG8bErDy WKZG6WKBLujNY/iUUnYk5dFgaIv6V8W54iuExrmI4ZyfuUoD+WTCrjld4OGYpdMs812N oQHmps/lBSh1sDSknFAsmWneURtDHTx36PfedTdHEwSqL1TS/d+A2BxUR5yQLIHkORrr HMzA== X-Gm-Message-State: AMke39mEUnXGQ7haokgE5otX8LQJH+060CAQt8PdRsXtaTQ2NjsQb6SENDZ3Mvn3gd/4lA== X-Received: by 10.200.37.125 with SMTP id 58mr35555946qtn.232.1487181342032; Wed, 15 Feb 2017 09:55:42 -0800 (PST) Received: from localhost.localdomain ([187.64.235.185]) by smtp.gmail.com with ESMTPSA id f128sm2733329qkb.3.2017.02.15.09.55.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Feb 2017 09:55:41 -0800 (PST) From: Gustavo Padovan To: linux-media@vger.kernel.org Cc: Gustavo Padovan , Andy Walls , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/6] [media] ivtv: improve subscribe_event handling Date: Wed, 15 Feb 2017 15:55:29 -0200 Message-Id: <20170215175533.6384-2-gustavo@padovan.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170215175533.6384-1-gustavo@padovan.org> References: <20170215175533.6384-1-gustavo@padovan.org> 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 From: Gustavo Padovan Simplify logic and call v4l2_ctrl_subscribe_event() directly instead of copying its content over to ivtv_subscribe_event(). Signed-off-by: Gustavo Padovan --- drivers/media/pci/ivtv/ivtv-ioctl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index f956188..670462d 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c @@ -1506,10 +1506,8 @@ static int ivtv_subscribe_event(struct v4l2_fh *fh, const struct v4l2_event_subs case V4L2_EVENT_VSYNC: case V4L2_EVENT_EOS: return v4l2_event_subscribe(fh, sub, 0, NULL); - case V4L2_EVENT_CTRL: - return v4l2_event_subscribe(fh, sub, 0, &v4l2_ctrl_sub_ev_ops); default: - return -EINVAL; + return v4l2_ctrl_subscribe_event(fh, sub); } }