From patchwork Mon Feb 3 02:51:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3567871 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 D481D9F2F5 for ; Mon, 3 Feb 2014 02:51:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D00DD2017B for ; Mon, 3 Feb 2014 02:51:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1057F2017A for ; Mon, 3 Feb 2014 02:51:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752686AbaBCCvj (ORCPT ); Sun, 2 Feb 2014 21:51:39 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:61235 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752675AbaBCCvi (ORCPT ); Sun, 2 Feb 2014 21:51:38 -0500 Received: by mail-pa0-f47.google.com with SMTP id kp14so6489103pab.6 for ; Sun, 02 Feb 2014 18:51:37 -0800 (PST) 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=uO3Pqxbc26hK7ZsXBX9pihpgZW6b0tywdwhKXRaO2Zg=; b=VB+PoCVhPkR1vq9+pzfLfdE79na/Ualon2akhZDREux93L5pvcsAJl4p7+Z1RFgQtg PoYSxG2PF7UfeYsGgR5EJ3lqWej3DLMZqAtJS9qxzaPWTBBwMIofylvbM28u3zcumnCy gjNoRVGCOwbqskHbghgGlNMLBMT/54Tu3DhebE4+ymkkubmgY4hGc6r7z8bCA6EV4Hy4 dIJYVXz8kLieO/ss885IA7YZabYIt7zvw2ktuntyO3h6Obca69loiKEV0WYigYoMScw1 hWzAu0dJxWrQPbF3wgCBSrqX1kEwy1o0szgHN6VN1T2pLiiCg/WygY4LS41BIvEo/QUU Jhng== X-Gm-Message-State: ALoCoQkEQV377pJcHdM9bMkqjtHPHWpQJo9vp+rsXdsjamO2OgrEw2wHOBzrJKr+0pdyEzLQnNs6 X-Received: by 10.66.148.230 with SMTP id tv6mr376046pab.155.1391395897318; Sun, 02 Feb 2014 18:51:37 -0800 (PST) Received: from [192.168.0.102] (218-164-142-106.dynamic.hinet.net. [218.164.142.106]) by mx.google.com with ESMTPSA id om6sm50809107pbc.43.2014.02.02.18.51.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Feb 2014 18:51:36 -0800 (PST) Message-ID: <1391395890.4629.1.camel@phoenix> Subject: [PATCH] spi: bfin5xx: Remove duplicate code to check spi->mode From: Axel Lin To: Mark Brown Cc: Sonic Zhang , Steven Miao , linux-spi@vger.kernel.org Date: Mon, 03 Feb 2014 10:51:30 +0800 X-Mailer: Evolution 3.6.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=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 checking is already done in the implementation of spi_setup(). Signed-off-by: Axel Lin --- drivers/spi/spi-bfin5xx.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c index f0f195a..c6902d2 100644 --- a/drivers/spi/spi-bfin5xx.c +++ b/drivers/spi/spi-bfin5xx.c @@ -1030,10 +1030,6 @@ static int bfin_spi_setup(struct spi_device *spi) } /* translate common spi framework into our register */ - if (spi->mode & ~(SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST)) { - dev_err(&spi->dev, "unsupported spi modes detected\n"); - goto error; - } if (spi->mode & SPI_CPOL) chip->ctl_reg |= BIT_CTL_CPOL; if (spi->mode & SPI_CPHA)