From patchwork Sun Nov 13 13:37:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9424837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3878C60484 for ; Sun, 13 Nov 2016 13:59:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20E5328A1D for ; Sun, 13 Nov 2016 13:59:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00FD528A22; Sun, 13 Nov 2016 13:59:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A826628A0D for ; Sun, 13 Nov 2016 13:59:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933559AbcKMN7f (ORCPT ); Sun, 13 Nov 2016 08:59:35 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34836 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933505AbcKMN7f (ORCPT ); Sun, 13 Nov 2016 08:59:35 -0500 Received: by mail-wm0-f65.google.com with SMTP id a20so8408185wme.2 for ; Sun, 13 Nov 2016 05:58:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=cCMsUPntmFwQuQfztLF7l/vy+xicDZsoGKHTjWC7dEs=; b=ajCJPQSc+YGBm2VqQaORRNbR1/YOY50rBdqjHjvP0VRtqUkJ8DhBgZBcDAvWoC9c5b 4gh3mrCAo+lZjdbux0/cS4DUe1jJbmguxv1zbz/Vp1jR22eiauv6p091cIvq6xeQhCNw ozLg43k+xPF8SF/lBMzH/zY2H/RrvlzfZSBiVx9cl9XDTrfL9lPnD3U06WcX1FYCN7wY wXgug3ugH9pzNbj2g7gxv1Dj7LjH00yB5u8rkJnXSCyhIn0e1IvATuFrSLA5UCJ34dlj kKJDPQuBNJC7ZsrPQA//1crodDfMvWBt5ahCIubV0O3HSPFJMDErr4FZPNS1nOxGP5WO tzfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=cCMsUPntmFwQuQfztLF7l/vy+xicDZsoGKHTjWC7dEs=; b=ieL6ZjnyWrXV8DktKPa3GKNOlrggEM07C+ndV1P5dhbhLuYspRV9gCB2CzIrYPqp0I KNgqQ7rfx3IEQ1+kE10umJ0J9Z+xkQv1wPbzejAV2bBmOzHa0WjwAqZODnqBG6aOH1tm tggal33TrjlkHLI5tYtg1akRsbTmB1akrG0EnjBwM6fARiH9ZcVgFsr1Q3jWyQOGUVle r6vACyvQNfEIHF+tDfaPNFynN7lQCm7w3yaTY1F+PVJb6Oa08BD88vTPjTVDo8dkFlBd gu2RAFzgsudoljbLSvM579EKXDAC+Eqq531vbCCyWsLtelDQrUVTxGySyhB5sip4iexl +GSg== X-Gm-Message-State: ABUngveunmwcJ0CijHTxbYRJksYtCsJfRV/xgGQiNtsnvEDXohPsFsc92m+LpV75ZiCfUw== X-Received: by 10.194.98.208 with SMTP id ek16mr19647470wjb.94.1479044480735; Sun, 13 Nov 2016 05:41:20 -0800 (PST) Received: from ?IPv6:2003:62:5f58:9d00:45b5:f382:329:d09c? (p200300625F589D0045B5F3820329D09C.dip0.t-ipconnect.de. [2003:62:5f58:9d00:45b5:f382:329:d09c]) by smtp.googlemail.com with ESMTPSA id m9sm22297096wma.0.2016.11.13.05.41.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Nov 2016 05:41:20 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 05/10] spi: fsl-espi: remove usage of mpc8xxx_spi->flags To: Mark Brown References: Cc: "linux-spi@vger.kernel.org" Message-ID: Date: Sun, 13 Nov 2016 14:37:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change the check to access property "mode" directly. This allows us to get rid of mpc8xxx_spi->flags in a subsequent patch in this patch series as it's used nowhere else. Signed-off-by: Heiner Kallweit --- drivers/spi/spi-fsl-espi.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index 6a011b0..e378622 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c @@ -620,12 +620,6 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem, if (ret) goto err_probe; - if (mpc8xxx_spi->flags & SPI_QE_CPU_MODE) { - dev_err(dev, "SPI_QE_CPU_MODE is not supported on ESPI!\n"); - ret = -EINVAL; - goto err_probe; - } - /* SPI controller initializations */ fsl_espi_write_reg(mpc8xxx_spi, ESPI_SPMODE, 0); fsl_espi_write_reg(mpc8xxx_spi, ESPI_SPIM, 0); @@ -714,6 +708,11 @@ static int of_fsl_espi_probe(struct platform_device *ofdev) unsigned int irq, num_cs; int ret; + if (of_property_read_bool(np, "mode")) { + dev_err(dev, "mode property is not supported on ESPI!\n"); + return -EINVAL; + } + ret = of_mpc8xxx_spi_probe(ofdev); if (ret) return ret;