From patchwork Mon May 26 12:05:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 4241931 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B784DBF90B for ; Mon, 26 May 2014 12:05:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0DA92020A for ; Mon, 26 May 2014 12:05:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6A57201FA for ; Mon, 26 May 2014 12:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbaEZMF2 (ORCPT ); Mon, 26 May 2014 08:05:28 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:42183 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751549AbaEZMF2 (ORCPT ); Mon, 26 May 2014 08:05:28 -0400 Received: from ayla.of.borg ([84.193.72.141]) by andre.telenet-ops.be with bizsmtp id 6c5R1o01432ts5g01c5RRf; Mon, 26 May 2014 14:05:26 +0200 Received: from geert by ayla.of.borg with local (Exim 4.76) (envelope-from ) id 1Wotef-0004J6-Co; Mon, 26 May 2014 14:05:25 +0200 From: Geert Uytterhoeven To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] spi: core: Ignore unsupported spi-[tr]x-bus-width property values Date: Mon, 26 May 2014 14:05:25 +0200 Message-Id: <1401105925-16528-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.7.9.5 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.5 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 Rejecting unsupported values of spi-tx-bus-width and spi-rx-bus-width may break compatibility with future DTs. Just ignore them, falling back to Single SPI Transfers. Signed-off-by: Geert Uytterhoeven --- I thought I sent this before, but I can't find any evidence drivers/spi/spi.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 074f55f5d5ec..d4f9670b51bc 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1270,11 +1270,10 @@ static void of_register_spi_devices(struct spi_master *master) spi->mode |= SPI_TX_QUAD; break; default: - dev_err(&master->dev, - "spi-tx-bus-width %d not supported\n", - value); - spi_dev_put(spi); - continue; + dev_warn(&master->dev, + "spi-tx-bus-width %d not supported\n", + value); + break; } } @@ -1289,11 +1288,10 @@ static void of_register_spi_devices(struct spi_master *master) spi->mode |= SPI_RX_QUAD; break; default: - dev_err(&master->dev, - "spi-rx-bus-width %d not supported\n", - value); - spi_dev_put(spi); - continue; + dev_warn(&master->dev, + "spi-rx-bus-width %d not supported\n", + value); + break; } }