From patchwork Sun Jul 23 09:31:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schwarzott X-Patchwork-Id: 9858287 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 B4AF860380 for ; Sun, 23 Jul 2017 09:32:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AAA628500 for ; Sun, 23 Jul 2017 09:32:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8BE6228502; Sun, 23 Jul 2017 09:32:04 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 0F54D28500 for ; Sun, 23 Jul 2017 09:32:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751373AbdGWJb5 (ORCPT ); Sun, 23 Jul 2017 05:31:57 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:48892 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbdGWJb5 (ORCPT ); Sun, 23 Jul 2017 05:31:57 -0400 Received: from gauss.fritz.box (unknown [IPv6:2001:a62:274:6301:a04f:c4d5:7f4f:e69c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zzam) by smtp.gentoo.org (Postfix) with ESMTPSA id 825243417EF; Sun, 23 Jul 2017 09:31:55 +0000 (UTC) From: Matthias Schwarzott To: linux-media@vger.kernel.org, hverkuil@xs4all.nl Cc: Matthias Schwarzott Subject: [PATCH] Add compat code for skb_put_data Date: Sun, 23 Jul 2017 11:31:51 +0200 Message-Id: <20170723093151.26338-1-zzam@gentoo.org> X-Mailer: git-send-email 2.13.3 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 Signed-off-by: Matthias Schwarzott --- v4l/compat.h | 12 ++++++++++++ v4l/scripts/make_config_compat.pl | 1 + 2 files changed, 13 insertions(+) diff --git a/v4l/compat.h b/v4l/compat.h index 47e2694..e565292 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -2072,4 +2072,16 @@ static inline bool is_of_node(struct fwnode_handle *fwnode) } #endif +#ifdef NEED_SKB_PUT_DATA +static inline void *skb_put_data(struct sk_buff *skb, const void *data, + unsigned int len) +{ + void *tmp = skb_put(skb, len); + + memcpy(tmp, data, len); + + return tmp; +} +#endif + #endif /* _COMPAT_H */ diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index d186cb4..5ac59ab 100644 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -699,6 +699,7 @@ sub check_other_dependencies() check_files_for_func("of_fwnode_handle", "NEED_FWNODE", "include/linux/of.h"); check_files_for_func("to_of_node", "NEED_TO_OF_NODE", "include/linux/of.h"); check_files_for_func("is_of_node", "NEED_IS_OF_NODE", "include/linux/of.h"); + check_files_for_func("skb_put_data", "NEED_SKB_PUT_DATA", "include/linux/skbuff.h"); # For tests for uapi-dependent logic check_files_for_func_uapi("usb_endpoint_maxp", "NEED_USB_ENDPOINT_MAXP", "usb/ch9.h");