From patchwork Mon Feb 22 20:47:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 8382921 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 9E909C0553 for ; Mon, 22 Feb 2016 20:47:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C739120489 for ; Mon, 22 Feb 2016 20:47:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C7F92055B for ; Mon, 22 Feb 2016 20:47:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755506AbcBVUrK (ORCPT ); Mon, 22 Feb 2016 15:47:10 -0500 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:49830 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755475AbcBVUrI (ORCPT ); Mon, 22 Feb 2016 15:47:08 -0500 Received: from lanttu.localdomain (lanttu-e.localdomain [192.168.1.64]) by hillosipuli.retiisi.org.uk (Postfix) with ESMTP id 3CC7F600A3; Mon, 22 Feb 2016 22:47:05 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: mchehab@osg.samsung.com, hverkuil@xs4all.nl, shuahkh@osg.samsung.com, laurent.pinchart@ideasonboard.com, Sakari Ailus Subject: [PATCH v2 4/4] media: Move media_get_uptr() macro out of the media.h user space header Date: Mon, 22 Feb 2016 22:47:04 +0200 Message-Id: <1456174024-11389-5-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456174024-11389-1-git-send-email-sakari.ailus@linux.intel.com> References: <1456174024-11389-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY 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: Sakari Ailus The media_get_uptr() macro is mostly useful only for the IOCTL handling code in media-device.c so move it there. Signed-off-by: Sakari Ailus Acked-by: Laurent Pinchart --- drivers/media/media-device.c | 5 +++++ include/uapi/linux/media.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index f001c27..39afba0 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -38,6 +38,11 @@ * Userspace API */ +static inline void __user *media_get_uptr(__u64 arg) +{ + return (void __user *)(uintptr_t)arg; +} + static int media_device_open(struct file *filp) { return 0; diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h index 65991df..b989494 100644 --- a/include/uapi/linux/media.h +++ b/include/uapi/linux/media.h @@ -353,11 +353,6 @@ struct media_v2_topology { __u32 reserved[18]; }; -static inline void __user *media_get_uptr(__u64 arg) -{ - return (void __user *)(uintptr_t)arg; -} - /* ioctls */ #define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info)