From patchwork Thu Jun 27 06:56:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: girishks2000@gmail.com X-Patchwork-Id: 2790171 Return-Path: X-Original-To: patchwork-spi-devel-general@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 B00F29F756 for ; Thu, 27 Jun 2013 06:57:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D4482201D9 for ; Thu, 27 Jun 2013 06:57:33 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B522201D5 for ; Thu, 27 Jun 2013 06:57:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Us695-0007oc-Fq; Thu, 27 Jun 2013 06:57:31 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Us693-0007oP-O3 for spi-devel-general@lists.sourceforge.net; Thu, 27 Jun 2013 06:57:29 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.220.45 as permitted sender) client-ip=209.85.220.45; envelope-from=girishks2000@gmail.com; helo=mail-pa0-f45.google.com; Received: from mail-pa0-f45.google.com ([209.85.220.45]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Us68z-0001kb-0L for spi-devel-general@lists.sourceforge.net; Thu, 27 Jun 2013 06:57:29 +0000 Received: by mail-pa0-f45.google.com with SMTP id bi5so638390pad.32 for ; Wed, 26 Jun 2013 23:57:19 -0700 (PDT) X-Received: by 10.68.114.226 with SMTP id jj2mr4457966pbb.142.1372316239066; Wed, 26 Jun 2013 23:57:19 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id bs3sm1781108pbc.42.2013.06.26.23.57.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Jun 2013 23:57:17 -0700 (PDT) From: Girish K S To: linux-kernel@vger.kernel.org, spi-devel-general@lists.sourceforge.net Subject: [PATCH] spi: s3c64xx: add missing check for polling mode Date: Thu, 27 Jun 2013 12:26:53 +0530 Message-Id: <1372316213-30671-1-git-send-email-ks.giri@samsung.com> X-Mailer: git-send-email 1.7.5.4 X-Spam-Score: -1.4 (-) X-Headers-End: 1Us68z-0001kb-0L Cc: broonie@kernel.org X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable 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 After the patch "spi/s3c64xx: Fix non-dmaengine usage" with commit id 563b444e33810f3120838620c990480304e24e63 submitted by Mark Brown, the spi device detection in polling mode breaks. This revealed the missing check for polling during dma prepare. This patch adds the missing check. Signed-off-by: Girish K S --- drivers/spi/spi-s3c64xx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index d170cc0..ea82baa 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -434,6 +434,9 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi) dma_cap_mask_t mask; int ret; + if (is_polling(sdd)) + return 0; + dma_cap_zero(mask); dma_cap_set(DMA_SLAVE, mask);