From patchwork Tue Mar 18 02:48:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3852031 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4E871BF540 for ; Wed, 19 Mar 2014 17:35:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92EE520176 for ; Wed, 19 Mar 2014 17:35:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C0552034E for ; Wed, 19 Mar 2014 17:35:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753298AbaCRCsn (ORCPT ); Mon, 17 Mar 2014 22:48:43 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:52313 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753295AbaCRCsm (ORCPT ); Mon, 17 Mar 2014 22:48:42 -0400 Received: by mail-pa0-f51.google.com with SMTP id kq14so6572346pab.24 for ; Mon, 17 Mar 2014 19:48:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=KeXJWOtUlE5PlGi0fSfrVnKwfTOCv/NS93tgq6DA344=; b=ieOrapQp3tEf8Gb0e/MJRfzriiKoqnGdU71LpmCcTQcC4soZozXV9rpqbjR86heFX6 HnHI16uuso6BuSHstyqJmwU8JG/y9oJMZ9vZ73ELxo+iuTu+A+P3f/8PyUsShwWBf55P CRKmY16GSAzF1/eBBXqg45KyObxm+3Oa4LX9S7i9sI/ioNlei9EVli+dn0ZFNuTTDw3z usIg+u4kJ9UeFSa2eREleq2QQE4ftGzZr8eMmumlzd8FCkjuwcjy5Wb12tRveGkKkYSa SA+zkZIot6GIOHVC8gDDxop+2h9gUkLar54I2v+a15vCjuIDwjGzXWDqjhuNew1TYFmy 7/Qg== X-Gm-Message-State: ALoCoQmnJ01hxcmob5liPbwo6lpqSRTesbwRG/c6TwGte50AM6G+tTF97w3T8EFMU3/lcVkLef0n X-Received: by 10.68.136.133 with SMTP id qa5mr29645800pbb.63.1395110922300; Mon, 17 Mar 2014 19:48:42 -0700 (PDT) Received: from [192.168.0.102] (218-164-138-244.dynamic.hinet.net. [218.164.138.244]) by mx.google.com with ESMTPSA id tu3sm80181428pab.1.2014.03.17.19.48.40 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Mar 2014 19:48:41 -0700 (PDT) Message-ID: <1395110917.15410.1.camel@phoenix> Subject: [PATCH] spi: ti-ssp: Remove duplicate code to check full duplex transfer From: Axel Lin To: Mark Brown Cc: Cyril Chemparathy , linux-spi@vger.kernel.org Date: Tue, 18 Mar 2014 10:48:37 +0800 X-Mailer: Evolution 3.8.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This driver has set SPI_MASTER_HALF_DUPLEX flag, so spi core will reject full duplex transfer. We can remove the same checking in ti_ssp_spi_transfer(). Signed-off-by: Axel Lin --- drivers/spi/spi-ti-ssp.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/spi/spi-ti-ssp.c b/drivers/spi/spi-ti-ssp.c index 7d20e12..116640c 100644 --- a/drivers/spi/spi-ti-ssp.c +++ b/drivers/spi/spi-ti-ssp.c @@ -256,11 +256,6 @@ static int ti_ssp_spi_transfer(struct spi_device *spi, struct spi_message *m) dev_err(&spi->dev, "invalid xfer, no buffer\n"); return -EINVAL; } - - if (t->len && t->rx_buf && t->tx_buf) { - dev_err(&spi->dev, "invalid xfer, full duplex\n"); - return -EINVAL; - } } spin_lock(&hw->lock);