Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6206210imm; Mon, 23 Jul 2018 13:28:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpch2q04IqWEt8Uim4UE7vU98IgR8KGR3arXNrsGQmtCEN6Ri2AcbBCEOTCbcBbYT0wy6o7t X-Received: by 2002:a63:4703:: with SMTP id u3-v6mr13070901pga.405.1532377707479; Mon, 23 Jul 2018 13:28:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532377707; cv=none; d=google.com; s=arc-20160816; b=WToA9v0lquPSEi4SbgA7wLMa3B9mvR7XiaKb0Ek9uOUlRwSuf4BynfiRBdNcIVd3Lt LbguZ8hUScaqaDQmIDEHu9kgKuNFK4ZBRaMqxNEs4MMI7IwkIV+Q/lq3Z6H6lzxobmty pIImSRMZ3qZBb/Z2V38wVkf/GPsbZq5g3ewVknS2X+0k/DIEavIa6xTk/pqc+OQgqs3p IirNzWLMpol1cNVCTrGwB+hhUSTxRMmNu8nVbZuwJGndIWwiyVY3NYpSjSdXTlG0/Q9q KEofzzWouj/AWk54drVgq/lBMKxXUnuNo3LyEVAlVj3ajxpA4YCRW07HUeFqhPkI2RBy +f4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=aN/GYg3yRUHxtI9UG8+7cvufb1UuWNQlNsT/s4zxi5s=; b=sccRmQWOUaZty4uYPPZKnLKagxizrrVZE44dPrPwnDGtztDcnQohseOi3Jslgblt5f GfhId7lkwGWtaEubr+k2vnpTq3N9JuTckOST5PzD5HBg2aPQufKDh8PlKsUD+2vrF4tf lN749BIn3FQpn6qOcaX0Qe8IM8gxvQlOy2lELOj3Quyl+GmVx9qMealatdaO0hdX5BDF C7Y1X1fdfHmpEmGasmcbXB4p+4YeOVCblkq82UrReNzFRNQy9r8itnbUAyFavXPNtIE5 p37qQGjjQxMZKlg4Yy/jvQ/MiE8Vo5mRKjvz72avuAK8SbM3XGRXbYefYABklFzJNPAh xkOA== ARC-Authentication-Results: i=1; mx.google.com; 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 o123-v6si9289640pgo.190.2018.07.23.13.28.12; Mon, 23 Jul 2018 13:28:27 -0700 (PDT) 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; 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 S2388310AbeGWV3y (ORCPT + 99 others); Mon, 23 Jul 2018 17:29:54 -0400 Received: from sauhun.de ([88.99.104.3]:51256 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388149AbeGWV3w (ORCPT ); Mon, 23 Jul 2018 17:29:52 -0400 Received: from localhost (p54B3377D.dip0.t-ipconnect.de [84.179.55.125]) by pokefinder.org (Postfix) with ESMTPSA id 9EE2A631A4C; Mon, 23 Jul 2018 22:26:57 +0200 (CEST) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Laxman Dewangan , Thierry Reding , Jonathan Hunter , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/12] i2c: tegra: use core to detect 'no zero length' quirk Date: Mon, 23 Jul 2018 22:26:12 +0200 Message-Id: <20180723202617.15230-9-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180723202617.15230-1-wsa+renesas@sang-engineering.com> References: <20180723202617.15230-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org And don't reimplement in the driver. Signed-off-by: Wolfram Sang --- Only build tested. drivers/i2c/busses/i2c-tegra.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 60c8561fbe65..437294ea2f0a 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -684,9 +684,6 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_dev *i2c_dev, tegra_i2c_flush_fifos(i2c_dev); - if (msg->len == 0) - return -EINVAL; - i2c_dev->msg_buf = msg->buf; i2c_dev->msg_buf_remaining = msg->len; i2c_dev->msg_err = I2C_ERR_NONE; @@ -831,6 +828,7 @@ static const struct i2c_algorithm tegra_i2c_algo = { /* payload size is only 12 bit */ static const struct i2c_adapter_quirks tegra_i2c_quirks = { + .flags = I2C_AQ_NO_ZERO_LEN, .max_read_len = 4096, .max_write_len = 4096, }; -- 2.11.0