From patchwork Sun May 13 02:32:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 10396063 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 4F47A60215 for ; Sun, 13 May 2018 02:32:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F26428D37 for ; Sun, 13 May 2018 02:32:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32FA428D42; Sun, 13 May 2018 02:32:28 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, 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 7ADC328D37 for ; Sun, 13 May 2018 02:32:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751887AbeEMCc0 (ORCPT ); Sat, 12 May 2018 22:32:26 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:57108 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751129AbeEMCcZ (ORCPT ); Sat, 12 May 2018 22:32:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=AF6111eW2vmu6ms1Rc+JD2Lg60hejEEbSrprsYaszbM=; b=AJrvWlj8Wada Ff8ZZqXQyIghNfIhuZtYCm25+PJPQsX20s/uJHv946J6ibCx3luukRRjzX9zO6NpIaQj2kbm/w/a5 j8acU8Aos+ZKqhwjRDCCjpzE/C/4BXt543dvy9qsxqmY0nq87yIQZmRKMTfUx8hL49VfWZN+tSXV9 +3ruc=; Received: from kd111239173184.au-net.ne.jp ([111.239.173.184] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fHgoB-0005Y0-Ef; Sun, 13 May 2018 02:32:24 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id BEACE44007A; Sun, 13 May 2018 03:32:19 +0100 (BST) From: Mark Brown To: Boris Brezillon Cc: Mark Brown , Mark Brown , linux-spi@vger.kernel.org, linux-spi@vger.kernel.org Subject: Applied "spi: bcm-qspi: Fix build failure caused by spi_flash_read() API removal" to the spi tree In-Reply-To: <20180512062454.27407-1-boris.brezillon@bootlin.com> Message-Id: <20180513023219.BEACE44007A@finisterre.ee.mobilebroadband> Date: Sun, 13 May 2018 03:32:19 +0100 (BST) 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 The patch spi: bcm-qspi: Fix build failure caused by spi_flash_read() API removal has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From b6456057038b572382753b5e963f56f10e704804 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Sat, 12 May 2018 08:24:54 +0200 Subject: [PATCH] spi: bcm-qspi: Fix build failure caused by spi_flash_read() API removal Patch http://patchwork.ozlabs.org/patch/905205/ has been partially applied, and changes to the bcm-qspi driver have been lost somehow (probably due to a conflict when applying the patch). Remove the ->spi_flash_read() bits from this driver to fix the build error. Fixes: c1f5ba70decf ("spi: Get rid of the spi_flash_read() API") Signed-off-by: Boris Brezillon Signed-off-by: Mark Brown --- drivers/spi/spi-bcm-qspi.c | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index 9f94268a68b5..57ceec6c6301 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -944,9 +944,10 @@ static int bcm_qspi_mspi_exec_mem_op(struct spi_device *spi, return ret; } -static int bcm_qspi_exec_mem_op(struct spi_device *spi, +static int bcm_qspi_exec_mem_op(struct spi_mem *mem, const struct spi_mem_op *op) { + struct spi_device *spi = mem->spi; struct bcm_qspi *qspi = spi_master_get_devdata(spi->master); int ret = 0; bool mspi_read = false; @@ -991,34 +992,6 @@ static int bcm_qspi_exec_mem_op(struct spi_device *spi, return ret; } -static int bcm_qspi_exec_mem_op_wrapper(struct spi_mem *mem, - const struct spi_mem_op *op) -{ - return bcm_qspi_exec_mem_op(mem->spi, op); -} - -static int bcm_qspi_flash_read_wrapper(struct spi_device *spi, - struct spi_flash_read_message *msg) -{ - int ret; - struct spi_mem_op op = SPI_MEM_OP(SPI_MEM_OP_CMD(msg->read_opcode, 1), - SPI_MEM_OP_ADDR(msg->addr_width, - msg->from, - msg->addr_nbits), - SPI_MEM_OP_DUMMY(msg->dummy_bytes, - msg->addr_nbits), - SPI_MEM_OP_DATA_IN(msg->len, - msg->buf, - msg->data_nbits)); - - msg->retlen = 0; - ret = bcm_qspi_exec_mem_op(spi, &op); - if (!ret) - msg->retlen = msg->len; - - return ret; -} - static void bcm_qspi_cleanup(struct spi_device *spi) { struct bcm_qspi_parms *xp = spi_get_ctldata(spi); @@ -1214,7 +1187,7 @@ static void bcm_qspi_hw_uninit(struct bcm_qspi *qspi) } static const struct spi_controller_mem_ops bcm_qspi_mem_ops = { - .exec_op = bcm_qspi_exec_mem_op_wrapper, + .exec_op = bcm_qspi_exec_mem_op, }; static const struct of_device_id bcm_qspi_of_match[] = { @@ -1259,7 +1232,6 @@ int bcm_qspi_probe(struct platform_device *pdev, master->mode_bits = SPI_CPHA | SPI_CPOL | SPI_RX_DUAL | SPI_RX_QUAD; master->setup = bcm_qspi_setup; master->transfer_one = bcm_qspi_transfer_one; - master->spi_flash_read = bcm_qspi_flash_read_wrapper; master->mem_ops = &bcm_qspi_mem_ops; master->cleanup = bcm_qspi_cleanup; master->dev.of_node = dev->of_node;