Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4842163imm; Mon, 14 May 2018 14:12:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpolDzjcKYMMDJ01CGXzheEtwtUPqolLoticZ7Uoq2Iyt2OWrqge92wF6e2FlHlvAAq5kjV X-Received: by 2002:a17:902:265:: with SMTP id 92-v6mr11196352plc.368.1526332360946; Mon, 14 May 2018 14:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526332360; cv=none; d=google.com; s=arc-20160816; b=FT09KN9/pYl8t23YmexDg6UaeV13TUYWsrlELZgYp9gIcohGXQJJb6eAJYcpbZq2hc pIlgEnVwDb5LhePXlO23KanT3SYsM9Rdv58CvnOozCd1FgBO3KHvZu8E/nWAR+K1g7Ek imjjwXNnMxwEZi+vrGJNjfhFNcQbf4OSChpJNJoq3xp7B/CphWVnAyOw9vydStxfpHrs cAxIzp/8nPW1nUbEAiqAXIO7RYFExE3GTLkrf4DdZ2b3KEH0IbZ5X2ShWhlDPqTnniw7 AeVK2ROOBD3PLzRFWjn5CezBIPyDb0cbIc8kwSst5FAmXVOiK8VIrWWBDDFpwfvsRu2E y8dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:to:from :arc-authentication-results; bh=X/fELv2l/+R21CYZCRTrCGTzRZaVKBerREXZU9oowx0=; b=DtPLqxrT5nFh+IUulHDXjTwI0aoeGsuxZJTZpGMogYSMsJX3MK56GbI/Hmj25e3NU+ bo34TiyGGBlycgQg/T2ynXT1c9Rb8VUNala9uRLQiP/hm0ZUly5N2WA1N+5mh0BIXIA7 +OC3REuwWUokUpK7V/yxN8zIlAHH9vdotJtInvyaaAXeijAqkJ76yrIq23nHTbxd5Xve O8tjWS6G6GQ47taLYC77rbXK9bBWWyLyly/BMB8gh80wW8PBsntT2IAY1xt0Gi2MbwMe RoOzMoI23oor9XNtZwjkBn9+wiKrUM56eJj/MVof9v3d0967k3SBY4xQtX1PhB/N2wOj xU5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m14-v6si8258385pgs.178.2018.05.14.14.12.26; Mon, 14 May 2018 14:12:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752525AbeENVLy (ORCPT + 99 others); Mon, 14 May 2018 17:11:54 -0400 Received: from gofer.mess.org ([88.97.38.141]:33165 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752215AbeENVLF (ORCPT ); Mon, 14 May 2018 17:11:05 -0400 Received: by gofer.mess.org (Postfix, from userid 1000) id D0909611B1; Mon, 14 May 2018 22:11:01 +0100 (BST) From: Sean Young To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Alexei Starovoitov , Mauro Carvalho Chehab , Daniel Borkmann , netdev@vger.kernel.org, Matthias Reichl , Devin Heitmueller Subject: [PATCH v1 3/4] media: rc bpf: move ir_raw_event to uapi Date: Mon, 14 May 2018 22:11:00 +0100 Message-Id: <6ecdbd01b8c42c8784f2235c1e5109dac3dd86a5.1526331777.git.sean@mess.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The context provided to a BPF_PROG_RAWIR_DECODER is a struct ir_raw_event; ensure user space has a a definition. Signed-off-by: Sean Young --- include/media/rc-core.h | 19 +------------------ include/uapi/linux/bpf_rcdev.h | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 include/uapi/linux/bpf_rcdev.h diff --git a/include/media/rc-core.h b/include/media/rc-core.h index 6742fd86ff65..5d31e31d8ade 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h @@ -21,6 +21,7 @@ #include #include #include +#include #include /** @@ -299,24 +300,6 @@ void rc_keydown_notimeout(struct rc_dev *dev, enum rc_proto protocol, void rc_keyup(struct rc_dev *dev); u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode); -/* - * From rc-raw.c - * The Raw interface is specific to InfraRed. It may be a good idea to - * split it later into a separate header. - */ -struct ir_raw_event { - union { - u32 duration; - u32 carrier; - }; - u8 duty_cycle; - - unsigned pulse:1; - unsigned reset:1; - unsigned timeout:1; - unsigned carrier_report:1; -}; - #define DEFINE_IR_RAW_EVENT(event) struct ir_raw_event event = {} static inline void init_ir_raw_event(struct ir_raw_event *ev) diff --git a/include/uapi/linux/bpf_rcdev.h b/include/uapi/linux/bpf_rcdev.h new file mode 100644 index 000000000000..d8629ff2b960 --- /dev/null +++ b/include/uapi/linux/bpf_rcdev.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* Copyright (c) 2018 Sean Young + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + */ +#ifndef _UAPI__LINUX_BPF_RCDEV_H__ +#define _UAPI__LINUX_BPF_RCDEV_H__ + +struct ir_raw_event { + union { + __u32 duration; + __u32 carrier; + }; + __u8 duty_cycle; + + unsigned pulse:1; + unsigned reset:1; + unsigned timeout:1; + unsigned carrier_report:1; +}; + +#endif /* _UAPI__LINUX_BPF_RCDEV_H__ */ -- 2.17.0