From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2AE2C169C4 for ; Sun, 3 Feb 2019 13:04:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A81F620815 for ; Sun, 3 Feb 2019 13:04:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549199065; bh=cGA1cWktNmmNtpMnpTqvyXDUV469yGFdx/fJOvqqVGU=; h=Subject:To:From:Date:List-ID:From; b=yMALXR0pKR+FMrw06OyIQQEV0Azj8HWqL6RH9iT+f6B8IzdeccSMawM/yEWIzQVch XQbS04EkUAbJr88vlUBoEvZeqN53mdSJjrGxrR3mYGTPH2EYsdAmRSELopMWViGMvs NhvYrU8kwzx8bbii61NZVzvssVoZ0Pe5RVTZcm5I= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727755AbfBCNEZ (ORCPT ); Sun, 3 Feb 2019 08:04:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:41008 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726625AbfBCNEZ (ORCPT ); Sun, 3 Feb 2019 08:04:25 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3E337217D9; Sun, 3 Feb 2019 13:04:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549199064; bh=cGA1cWktNmmNtpMnpTqvyXDUV469yGFdx/fJOvqqVGU=; h=Subject:To:From:Date:From; b=tttlfTcM6ZbymKGDRg+WxgCaY3Ndwclu3ubBTDhVVu7Kc4YIW7sqO1UO5dlRCP/UG GDRI/nNDvYbtxV+yjgFCKbAheP4j0bRXVNYVNFFXjy1Il7pSG/+a4r05XRIkFABlEk BrSfiT4S37Ya202XvjgKUKzdY6wvuQW9ohKEiyls= Subject: patch "iio: ti-ads8688: Update buffer allocation for timestamps" added to staging-linus To: dmurphy@ti.com, Jonathan.Cameron@huawei.com, Stable@vger.kernel.org From: Date: Sun, 03 Feb 2019 14:04:12 +0100 Message-ID: <1549199052253165@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled iio: ti-ads8688: Update buffer allocation for timestamps to my staging git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git in the staging-linus branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will hopefully also be merged in Linus's tree for the next -rc kernel release. If you have any questions about this process, please let me know. >From f214ff521fb1f861c8d7f7d0af98b06bf61b3369 Mon Sep 17 00:00:00 2001 From: Dan Murphy Date: Fri, 11 Jan 2019 13:57:07 -0600 Subject: iio: ti-ads8688: Update buffer allocation for timestamps Per Jonathan Cameron, the buffer needs to allocate room for a 64 bit timestamp as well as the channels. Change the buffer to allocate this additional space. Fixes: 2a86487786b5c ("iio: adc: ti-ads8688: add trigger and buffer support") Signed-off-by: Dan Murphy Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/adc/ti-ads8688.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c index 184d686ebd99..8b4568edd5cb 100644 --- a/drivers/iio/adc/ti-ads8688.c +++ b/drivers/iio/adc/ti-ads8688.c @@ -41,6 +41,7 @@ #define ADS8688_VREF_MV 4096 #define ADS8688_REALBITS 16 +#define ADS8688_MAX_CHANNELS 8 /* * enum ads8688_range - ADS8688 reference voltage range @@ -385,7 +386,7 @@ static irqreturn_t ads8688_trigger_handler(int irq, void *p) { struct iio_poll_func *pf = p; struct iio_dev *indio_dev = pf->indio_dev; - u16 buffer[8]; + u16 buffer[ADS8688_MAX_CHANNELS + sizeof(s64)/sizeof(u16)]; int i, j = 0; for (i = 0; i < indio_dev->masklength; i++) { -- 2.20.1