Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp714465imj; Wed, 13 Feb 2019 16:21:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IbptGHiHqWrlWUF1wnOlfjvHmRX7Fund+cSXh9EsvZY2JDDojo9Is7gsLqFBvFI5FdG40IY X-Received: by 2002:a17:902:1122:: with SMTP id d31mr1013968pla.246.1550103663159; Wed, 13 Feb 2019 16:21:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550103663; cv=none; d=google.com; s=arc-20160816; b=CuxceuvlbEhgKhp4F0970uerQLHsEuQ+Qlh3lDusk+b679ZnPwqnZXO/Us705xmqea 1QhamjefUXpGXuSe8VgKmgnn/Wtl1y/1knT/vOrtFHblmag/OkQ6SpL4BW1HQ6OWT4z0 2hbLwOg62LxXWqYt5QU6cnwNje0ojvR719CLCeq/I6He0Q4uhvM/B5GbNS8Zn+Dxcf5n fJTg/N1ZjiLIduwXTLTiV5M9DuebuPgHoNiSuHJcG+Qu23YkPU09X2qyZB+7kRy/2oeC sXES4EeapPt8zSsecG0pj3NQlQSr8GRD000QqHzwNYWwOmBijJ7n5v6NJVdffKknrfGu xfaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7uQTZ6q0+b+tzhHo2I4ZuvDaKhFuZYQNS/eItEHWn58=; b=yPqlRNReE+X5zE80fqYpjOaYhrugG2JF+pjNuXwz0BcwhKDvx9CIkmd5XoX7EhoTxT RJL8dDmEMdNJQr7+fi1bz34enaH4SiOGDtLdXFV1XdAHiJpyI4rN/RUzh65O5/FZrkDt bSfeOAzjCbkB3LuYS9tNX7qz8UioED9XoiAquDy+Psi91EkGkO4TKhtH3A95mmVlRFV9 6W7S7uTk3Mo2qlfdm82JGkVHZRIOUaxI/pt8WMNWZT5VQ+24Fje3Ry9Og6j8c6DkVBb+ QcFyuLjyY2HIINYIjqx3KPhAng3YSlGfaQiwFyc6zNWYIpw7DOl4fY2jB/uK5YFaI4pS j7Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dZYDj0Bv; 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 b3si777476pff.198.2019.02.13.16.20.47; Wed, 13 Feb 2019 16:21:03 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=dZYDj0Bv; 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 S2436531AbfBMSrV (ORCPT + 99 others); Wed, 13 Feb 2019 13:47:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:44022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406261AbfBMSpW (ORCPT ); Wed, 13 Feb 2019 13:45:22 -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 514FD20811; Wed, 13 Feb 2019 18:45:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550083521; bh=pe1PfF7sSnU3S1jlFN4u22dJjeM8LYHTdm9reWOrKWU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dZYDj0BvFY1RyZSArMm+Tn7xmKc+EgVaJkeFIEvAunZ0GfyjQbynRc6gFaLiyx7sV 688f7+XQTWWX1PxskLqxStOkUh7F7SduIuvKiCBH+8bfrCuYh42M5GOoPrmuJOU95L OH2W/SbbuYn7eUTjrhHhyD5qjMOC3HnM+gY0sBm0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Murphy , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 4.20 09/50] iio: ti-ads8688: Update buffer allocation for timestamps Date: Wed, 13 Feb 2019 19:38:14 +0100 Message-Id: <20190213183656.551923286@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190213183655.747168774@linuxfoundation.org> References: <20190213183655.747168774@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Murphy commit f214ff521fb1f861c8d7f7d0af98b06bf61b3369 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/ti-ads8688.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- 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_handl { 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++) {