From patchwork Tue Aug 16 13:33:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 74018 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp2005826qga; Tue, 16 Aug 2016 06:34:21 -0700 (PDT) X-Received: by 10.98.100.67 with SMTP id y64mr64469706pfb.84.1471354461343; Tue, 16 Aug 2016 06:34:21 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9si32174765pfi.100.2016.08.16.06.34.21; Tue, 16 Aug 2016 06:34:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753589AbcHPNeJ (ORCPT + 3 others); Tue, 16 Aug 2016 09:34:09 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:34135 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753568AbcHPNeI (ORCPT ); Tue, 16 Aug 2016 09:34:08 -0400 Received: by mail-qk0-f178.google.com with SMTP id f123so70451302qkd.1 for ; Tue, 16 Aug 2016 06:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=l3RMQNpwhQDlgW7gmIFiubs3S5CgRVgTC0wB6oQ1QyU=; b=ged2CT3Xv0DaMlB/1IG40FED6H2R4QUYteN2OgZx3c1gobaa6v3RCtVK8WLaw7tafi v3//lqlRCZCNKOngn9cKjrNMEtq3q3pqygWjd0polpliKanb2wkOW+cwL3tS7vLTlySd L8ylI1fa1T/g4TJNIbOOq8gbCwjh0xBpf7lD0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=l3RMQNpwhQDlgW7gmIFiubs3S5CgRVgTC0wB6oQ1QyU=; b=I2m+AJkPg3LanKAK8SPYxUfaneoqsHL94Q/94l2b6amDJ3NskCe3LZZgbkxSZ+0dRY SUoabg4pmnTwQK6/TIYZ/26IG1mMYB+UIqgcmUmO0LJWY96UnOxhSkwf9qbs6lN9ZsJo FZm28+66xOcbZqwnPw8AUJnhJo1Clsb0pfUNp4Wgckc1tN1pRMCQZ7QjRaIH4kYJGsih FMvqFn4m/QJ+dp06kqWgZLeCynogI+mYbJZQAa+xM2fWjqAzK9IBXNs7zpNCHRPMXn9n g2tN4qTos/10yoagdNtGU5ULwzNv9Epno8IEeExC403eeK6L0vFcDNn1wg+Dc4hGhXsr M4yw== X-Gm-Message-State: AEkoouu60aVjDHu06l2pntnIw+oXVixTIb7NGzw97pAcl/1g3DTckXZvqYy/hhXheCN+ySX6 X-Received: by 10.46.33.222 with SMTP id h91mr5994563lji.50.1471354446974; Tue, 16 Aug 2016 06:34:06 -0700 (PDT) Received: from localhost.localdomain.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id 74sm813056ljb.36.2016.08.16.06.34.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 06:34:06 -0700 (PDT) From: Linus Walleij To: Jonathan Cameron , linux-iio@vger.kernel.org Cc: Linus Walleij , stable@vger.kernel.org Subject: [PATCH 02/17] iio: accel: kxsd9: Fix raw read return Date: Tue, 16 Aug 2016 15:33:28 +0200 Message-Id: <1471354423-19186-3-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471354423-19186-1-git-send-email-linus.walleij@linaro.org> References: <1471354423-19186-1-git-send-email-linus.walleij@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Any readings from the raw interface of the KXSD9 driver will return an empty string, because it does not return IIO_VAL_INT but rather some random value from the accelerometer to the caller. Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij --- drivers/iio/accel/kxsd9.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c index 3a9f106787d2..da5fb67ecb34 100644 --- a/drivers/iio/accel/kxsd9.c +++ b/drivers/iio/accel/kxsd9.c @@ -160,6 +160,7 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev, if (ret < 0) goto error_ret; *val = ret; + ret = IIO_VAL_INT; break; case IIO_CHAN_INFO_SCALE: ret = spi_w8r8(st->us, KXSD9_READ(KXSD9_REG_CTRL_C));