From patchwork Mon Jan 5 14:49:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 5568411 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1DC139F162 for ; Mon, 5 Jan 2015 14:49:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46D5620176 for ; Mon, 5 Jan 2015 14:49:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 66FFD2017E for ; Mon, 5 Jan 2015 14:49:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753475AbbAEOtl (ORCPT ); Mon, 5 Jan 2015 09:49:41 -0500 Received: from mail-pd0-f170.google.com ([209.85.192.170]:49314 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753268AbbAEOtl (ORCPT ); Mon, 5 Jan 2015 09:49:41 -0500 Received: by mail-pd0-f170.google.com with SMTP id v10so28430009pde.29 for ; Mon, 05 Jan 2015 06:49:41 -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=HZARTVeTXO4/Laja4g2QPRjCnbd0QD5OJt7nx6GZMjo=; b=YtCQ8HiIVM2565w6d4m3uLhCsrtBDcZtxMcvwuEk7G2LKu1VyIWiSaKBis2oXMCXxj cZsZffUE58uk97cewVzfiYWIY1JNi7Qjr7H9EITm7uvZqAQKABZGbizTNTo1YPx710PZ zARqIMkfxEMw49khvy0ZwKq5/bQuAdx58sgBbqZa5qxAwakA/F5wHvNn9ogPy9Ja6g/A IhNYxNd9y0TWM2R/z1GQx8jpRP7wbwI99TWJZYLT+OsFY7AlZKtej0NKIQbWEGerdJ3J 8sMdIBb/C6n+Uy2doWW6gOBZHavVt4f8nt7NTHlGQGLjc+3/MvXGPjvSZznPDNEB4tJg S7xQ== X-Gm-Message-State: ALoCoQk4JExxAGYnnPXypgdWwq6BM7XiLG9XjYPuBja1Q++R4PouPa1g4UfqQwqlJEtTjMzqX+yd X-Received: by 10.68.204.66 with SMTP id kw2mr16207199pbc.149.1420469380888; Mon, 05 Jan 2015 06:49:40 -0800 (PST) Received: from [192.168.0.104] (36-239-212-135.dynamic-ip.hinet.net. [36.239.212.135]) by mx.google.com with ESMTPSA id ms4sm54388649pbc.92.2015.01.05.06.49.39 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Mon, 05 Jan 2015 06:49:40 -0800 (PST) Message-ID: <1420469376.6880.1.camel@phoenix> Subject: [PATCH] spi: st-ssc4: Remove duplicate code to test unsupported mode bits From: Axel Lin To: Mark Brown Cc: Lee Jones , linux-spi Date: Mon, 05 Jan 2015 22:49:36 +0800 X-Mailer: Evolution 3.10.4-0ubuntu2 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 spi_setup() will test unsupported mode bits before calling spi->master->setup. Thus remove duplicate code to test unsupported mode bits in spi_st_setup(). Signed-off-by: Axel Lin --- drivers/spi/spi-st-ssc4.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/spi/spi-st-ssc4.c b/drivers/spi/spi-st-ssc4.c index 8f8770a..2faeaa7 100644 --- a/drivers/spi/spi-st-ssc4.c +++ b/drivers/spi/spi-st-ssc4.c @@ -217,12 +217,6 @@ static int spi_st_setup(struct spi_device *spi) int cs = spi->cs_gpio; int ret; - if (spi->mode & ~MODEBITS) { - dev_err(&spi->dev, "unsupported mode bits 0x%x\n", - spi->mode & ~MODEBITS); - return -EINVAL; - } - if (!hz) { dev_err(&spi->dev, "max_speed_hz unspecified\n"); return -EINVAL;