From patchwork Thu Nov 12 12:21:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hans Verkuil (hansverk)" X-Patchwork-Id: 7601471 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 694AEC05CA for ; Thu, 12 Nov 2015 12:22:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 79BA120742 for ; Thu, 12 Nov 2015 12:22:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DEE9B20760 for ; Thu, 12 Nov 2015 12:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754465AbbKLMWS (ORCPT ); Thu, 12 Nov 2015 07:22:18 -0500 Received: from aer-iport-1.cisco.com ([173.38.203.51]:2580 "EHLO aer-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754140AbbKLMWG (ORCPT ); Thu, 12 Nov 2015 07:22:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1618; q=dns/txt; s=iport; t=1447330926; x=1448540526; h=from:to:cc:subject:date:message-id; bh=iMq6s22zeaaKoEKP+tJcdUYEQ8WZj5rRqcW4+hJJrkY=; b=E6M+ZAI5K6j3YiHUhdyLfomLrNG1VqG1t01Li711HtDnhrbNOFHpTR85 B01xguUKp0gTmNE+fWSNZaptsWN3iSqLx5kTJ+TfErZsfL2vaRPGUE1uK PQK60B5ZcEIh5Rq5bQJc4++ZfuQ+v7NuASS+7IxWZ3B6wCTlBxbxnEn/l Q=; X-IronPort-AV: E=Sophos;i="5.20,281,1444694400"; d="scan'208";a="631678398" Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP; 12 Nov 2015 12:22:01 +0000 Received: from cobaltpc1.rd.cisco.com ([10.47.79.222]) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id tACCLvM8009470; Thu, 12 Nov 2015 12:22:00 GMT From: Hans Verkuil To: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, linux-input@vger.kernel.org, linux-samsung-soc@vger.kernel.org, lars@opdenkamp.eu, linux@arm.linux.org.uk, Hans Verkuil Subject: [PATCHv10 08/16] cec: add compat32 ioctl support Date: Thu, 12 Nov 2015 13:21:37 +0100 Message-Id: <793abfb94a6335a7f771ae99c6e8fdb1619a1882.1447329279.git.hansverk@cisco.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-14.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hans Verkuil The CEC ioctls didn't have compat32 support, so they returned -ENOTTY when used in a 32 bit application on a 64 bit kernel. Since all the CEC ioctls are 32-bit compatible adding support for this API is trivial. Signed-off-by: Hans Verkuil --- fs/compat_ioctl.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 48851f6..c8651aa 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -1381,6 +1382,24 @@ COMPATIBLE_IOCTL(VIDEO_GET_NAVI) COMPATIBLE_IOCTL(VIDEO_SET_ATTRIBUTES) COMPATIBLE_IOCTL(VIDEO_GET_SIZE) COMPATIBLE_IOCTL(VIDEO_GET_FRAME_RATE) +/* cec */ +COMPATIBLE_IOCTL(CEC_ADAP_G_CAPS) +COMPATIBLE_IOCTL(CEC_ADAP_G_LOG_ADDRS) +COMPATIBLE_IOCTL(CEC_ADAP_S_LOG_ADDRS) +COMPATIBLE_IOCTL(CEC_ADAP_G_STATE) +COMPATIBLE_IOCTL(CEC_ADAP_S_STATE) +COMPATIBLE_IOCTL(CEC_ADAP_G_PHYS_ADDR) +COMPATIBLE_IOCTL(CEC_ADAP_S_PHYS_ADDR) +COMPATIBLE_IOCTL(CEC_ADAP_G_VENDOR_ID) +COMPATIBLE_IOCTL(CEC_ADAP_S_VENDOR_ID) +COMPATIBLE_IOCTL(CEC_G_MONITOR) +COMPATIBLE_IOCTL(CEC_S_MONITOR) +COMPATIBLE_IOCTL(CEC_CLAIM) +COMPATIBLE_IOCTL(CEC_RELEASE) +COMPATIBLE_IOCTL(CEC_G_PASSTHROUGH) +COMPATIBLE_IOCTL(CEC_TRANSMIT) +COMPATIBLE_IOCTL(CEC_RECEIVE) +COMPATIBLE_IOCTL(CEC_DQEVENT) /* joystick */ COMPATIBLE_IOCTL(JSIOCGVERSION)