From patchwork Tue Sep 15 13:26:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 7184971 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 9E8769F444 for ; Tue, 15 Sep 2015 13:27:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB9F6206A9 for ; Tue, 15 Sep 2015 13:27:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D0A64206A5 for ; Tue, 15 Sep 2015 13:27:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752531AbbION1W (ORCPT ); Tue, 15 Sep 2015 09:27:22 -0400 Received: from mga03.intel.com ([134.134.136.65]:14746 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752529AbbION1V (ORCPT ); Tue, 15 Sep 2015 09:27:21 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 15 Sep 2015 06:27:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,536,1437462000"; d="scan'208";a="804826469" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.68]) by orsmga002.jf.intel.com with ESMTP; 15 Sep 2015 06:27:05 -0700 From: Jarkko Nikula To: linux-spi@vger.kernel.org Cc: Mark Brown , Nicolas Ferre , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Kukjin Kim , Krzysztof Kozlowski , Jarkko Nikula Subject: [PATCH 12/16] spi: dw: Remove test for non-zero spi->max_speed_hz Date: Tue, 15 Sep 2015 16:26:24 +0300 Message-Id: <1442323588-29642-12-git-send-email-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.5.1 In-Reply-To: <1442323588-29642-1-git-send-email-jarkko.nikula@linux.intel.com> References: <1442323588-29642-1-git-send-email-jarkko.nikula@linux.intel.com> 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=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 Test for non-zero spi->max_speed_hz in dw_spi_setup() looks needless as spi_setup() defaults to master->max_speed_hz in case it is not set. This drivers sets the master->max_speed_hz based on max_freq data passed to it via dw_spi_add_host() call. I suppose things have already fallen apart if dw_spi_mmio_probe() or spi_pci_probe() ever passes zero max_freq. Signed-off-by: Jarkko Nikula --- drivers/spi/spi-dw.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index 2b5d736465c9..1153d36ec8a6 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -448,11 +448,6 @@ static int dw_spi_setup(struct spi_device *spi) } chip->bits_per_word = spi->bits_per_word; - if (!spi->max_speed_hz) { - dev_err(&spi->dev, "No max speed HZ parameter\n"); - return -EINVAL; - } - chip->tmode = 0; /* Tx & Rx */ /* Default SPI mode is SCPOL = 0, SCPH = 0 */ chip->cr0 = (chip->bits_per_word - 1)