From patchwork Mon Jul 24 20:53:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jasmin J." X-Patchwork-Id: 9860537 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 1E9AF60349 for ; Mon, 24 Jul 2017 20:53:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12AE220265 for ; Mon, 24 Jul 2017 20:53:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07CB626224; Mon, 24 Jul 2017 20:53:53 +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 A1F2C20265 for ; Mon, 24 Jul 2017 20:53:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755817AbdGXUxu (ORCPT ); Mon, 24 Jul 2017 16:53:50 -0400 Received: from mail.anw.at ([195.234.101.228]:36495 "EHLO mail.anw.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754490AbdGXUxo (ORCPT ); Mon, 24 Jul 2017 16:53:44 -0400 Received: from hoppel.217.196.72.190 (anwhome.anw.at [195.234.103.23]) by mail.anw.at (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v6OKrgHv002261; Mon, 24 Jul 2017 22:53:43 +0200 From: "Jasmin J." To: linux-media@vger.kernel.org Cc: hverkuil@xs4all.nl, d.scheller@gmx.net, jasmin@anw.at Subject: [PATCH V2 3/3] build: fix up build w/kernels <=4.12 by reverting 4.13 patches Date: Mon, 24 Jul 2017 22:53:37 +0200 Message-Id: <1500929617-13623-4-git-send-email-jasmin@anw.at> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500929617-13623-1-git-send-email-jasmin@anw.at> References: <1500929617-13623-1-git-send-email-jasmin@anw.at> X-Antivirus: checked in 0.018sec at mail.anw.at ([195.234.102.72]) by smf-clamd v1.2.1 - http://smfs.sf.net/ 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: Daniel Scheller Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich --- backports/backports.txt | 3 + .../v4.12_revert_solo6x10_copykerneluser.patch | 71 ++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 backports/v4.12_revert_solo6x10_copykerneluser.patch diff --git a/backports/backports.txt b/backports/backports.txt index 9803f76..873b2f5 100644 --- a/backports/backports.txt +++ b/backports/backports.txt @@ -26,6 +26,9 @@ add pr_fmt.patch add debug.patch add drx39xxj.patch +[4.12.255] +add v4.12_revert_solo6x10_copykerneluser.patch + [4.10.255] add v4.10_sched_signal.patch add v4.10_fault_page.patch diff --git a/backports/v4.12_revert_solo6x10_copykerneluser.patch b/backports/v4.12_revert_solo6x10_copykerneluser.patch new file mode 100644 index 0000000..2ccb9d8 --- /dev/null +++ b/backports/v4.12_revert_solo6x10_copykerneluser.patch @@ -0,0 +1,71 @@ +commit bbf3d164ec2723f090533c14ec1dc166eaca46f8 +Author: Daniel Scheller +Date: Fri Jul 21 20:41:49 2017 +0200 + + Revert "[media] solo6x10: Convert to the new PCM ops" + + This reverts commit 1facf21e8b903524b34f09c39a7d27b4b71a07f7. + +diff --git a/drivers/media/pci/solo6x10/solo6x10-g723.c b/drivers/media/pci/solo6x10/solo6x10-g723.c +index 3ca947092775..36e93540bb49 100644 +--- a/drivers/media/pci/solo6x10/solo6x10-g723.c ++++ b/drivers/media/pci/solo6x10/solo6x10-g723.c +@@ -223,9 +223,9 @@ static snd_pcm_uframes_t snd_solo_pcm_pointer(struct snd_pcm_substream *ss) + return idx * G723_FRAMES_PER_PAGE; + } + +-static int __snd_solo_pcm_copy(struct snd_pcm_substream *ss, +- unsigned long pos, void *dst, +- unsigned long count, bool in_kernel) ++static int snd_solo_pcm_copy(struct snd_pcm_substream *ss, int channel, ++ snd_pcm_uframes_t pos, void __user *dst, ++ snd_pcm_uframes_t count) + { + struct solo_snd_pcm *solo_pcm = snd_pcm_substream_chip(ss); + struct solo_dev *solo_dev = solo_pcm->solo_dev; +@@ -242,31 +242,16 @@ static int __snd_solo_pcm_copy(struct snd_pcm_substream *ss, + if (err) + return err; + +- if (in_kernel) +- memcpy(dst, solo_pcm->g723_buf, G723_PERIOD_BYTES); +- else if (copy_to_user((void __user *)dst, +- solo_pcm->g723_buf, G723_PERIOD_BYTES)) ++ err = copy_to_user(dst + (i * G723_PERIOD_BYTES), ++ solo_pcm->g723_buf, G723_PERIOD_BYTES); ++ ++ if (err) + return -EFAULT; +- dst += G723_PERIOD_BYTES; + } + + return 0; + } + +-static int snd_solo_pcm_copy_user(struct snd_pcm_substream *ss, int channel, +- unsigned long pos, void __user *dst, +- unsigned long count) +-{ +- return __snd_solo_pcm_copy(ss, pos, (void *)dst, count, false); +-} +- +-static int snd_solo_pcm_copy_kernel(struct snd_pcm_substream *ss, int channel, +- unsigned long pos, void *dst, +- unsigned long count) +-{ +- return __snd_solo_pcm_copy(ss, pos, dst, count, true); +-} +- + static const struct snd_pcm_ops snd_solo_pcm_ops = { + .open = snd_solo_pcm_open, + .close = snd_solo_pcm_close, +@@ -276,8 +261,7 @@ static const struct snd_pcm_ops snd_solo_pcm_ops = { + .prepare = snd_solo_pcm_prepare, + .trigger = snd_solo_pcm_trigger, + .pointer = snd_solo_pcm_pointer, +- .copy_user = snd_solo_pcm_copy_user, +- .copy_kernel = snd_solo_pcm_copy_kernel, ++ .copy = snd_solo_pcm_copy, + }; + + static int snd_solo_capture_volume_info(struct snd_kcontrol *kcontrol,