From patchwork Wed Mar 19 03:56:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3857141 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1BDEF9F369 for ; Wed, 19 Mar 2014 18:03:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5406C2021A for ; Wed, 19 Mar 2014 18:03:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8540D20131 for ; Wed, 19 Mar 2014 18:03:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757935AbaCSD40 (ORCPT ); Tue, 18 Mar 2014 23:56:26 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:58201 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756662AbaCSD40 (ORCPT ); Tue, 18 Mar 2014 23:56:26 -0400 Received: by mail-pd0-f175.google.com with SMTP id x10so8014057pdj.6 for ; Tue, 18 Mar 2014 20:56:25 -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:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=UnO8vL74qHGEOPLNnoL9TLyy8caIUEb9NyhCJXBxYQA=; b=Fg6sWJM8zu6kyUSIXHEhFifwwIbk6CNnrx5PNbyOfu1nDAG2VgjLXTpfsyuKDs5+v/ smSjvrnI08muGrY39qvA71KSEll97ObnSlAOFsjb9pXtFON20ZGcezer0zcJlwyqWiY8 MUqDxjTcHj73+wXbc36TLdjBnG6oyqJNULl4eaRtAEu1hRV/KvM5xCw0RSXX2JjNsXXG 1p8lx83BcNOPGyYdNd5ty/+zRxBAwIb+h6p0Hxs3lrV+3PTTUUv9LHzSUn5dlhCwQAHa 3VawFvAozyJvAZF4/ZLpARXJy7TOWfHK8d/HODomqiyRzG5SvmucJZAAI28yEPrQ+Yy5 DANQ== X-Gm-Message-State: ALoCoQm7UcW7H2po7+ygo7QhB1+XLoMH0d45nrfceHS380etkav40ont1aH4RCs6hssZb1RAb/Pw X-Received: by 10.66.139.100 with SMTP id qx4mr15202434pab.141.1395201385698; Tue, 18 Mar 2014 20:56:25 -0700 (PDT) Received: from [192.168.0.102] (218-164-140-191.dynamic.hinet.net. [218.164.140.191]) by mx.google.com with ESMTPSA id ix2sm57609878pbc.45.2014.03.18.20.56.23 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 18 Mar 2014 20:56:25 -0700 (PDT) Message-ID: <1395201381.16346.4.camel@phoenix> Subject: [PATCH 3/7] spi: omap-100k: Let spi core validate Tx/Rx buffers for non-zero length transfer From: Axel Lin To: Mark Brown Cc: Fabrice Crohas , linux-spi@vger.kernel.org Date: Wed, 19 Mar 2014 11:56:21 +0800 In-Reply-To: <1395201227.16346.1.camel@phoenix> References: <1395201227.16346.1.camel@phoenix> 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 Signed-off-by: Axel Lin --- drivers/spi/spi-omap-100k.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index c9e2282..05069ee 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c @@ -324,10 +324,6 @@ static int omap1_spi100k_transfer_one_message(struct spi_master *master, int status = 0; list_for_each_entry(t, &m->transfers, transfer_list) { - if (t->tx_buf == NULL && t->rx_buf == NULL && t->len) { - status = -EINVAL; - break; - } if (par_override || t->speed_hz || t->bits_per_word) { par_override = 1; status = omap1_spi100k_setup_transfer(spi, t);