From: Yue Haibing <yuehaibing@huawei.com>
To: <broonie@kernel.org>, <naga.sureshkumar.relli@xilinx.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-spi@vger.kernel.org>,
YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH] spi: spi-mem: Fix build error without CONFIG_SPI_MEM
Date: Mon, 8 Apr 2019 22:39:49 +0800 [thread overview]
Message-ID: <20190408143949.10688-1-yuehaibing@huawei.com> (raw)
From: YueHaibing <yuehaibing@huawei.com>
When building with CONFIG_SPI_MEM is not set
gc warns this:
drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'
Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI controller")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
include/linux/spi/spi-mem.h | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index c845cd6..1941b84 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -295,6 +295,10 @@ int spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
void spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
const struct spi_mem_op *op,
struct sg_table *sg);
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+ const struct spi_mem_op *op);
+
#else
static inline int
spi_controller_dma_map_mem_op_data(struct spi_controller *ctlr,
@@ -310,6 +314,13 @@ spi_controller_dma_unmap_mem_op_data(struct spi_controller *ctlr,
struct sg_table *sg)
{
}
+
+bool spi_mem_default_supports_op(struct spi_mem *mem,
+ const struct spi_mem_op *op)
+{
+ return false;
+}
+
#endif /* CONFIG_SPI_MEM */
int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
@@ -341,9 +352,6 @@ int spi_mem_driver_register_with_owner(struct spi_mem_driver *drv,
void spi_mem_driver_unregister(struct spi_mem_driver *drv);
-bool spi_mem_default_supports_op(struct spi_mem *mem,
- const struct spi_mem_op *op);
-
#define spi_mem_driver_register(__drv) \
spi_mem_driver_register_with_owner(__drv, THIS_MODULE)
--
2.7.4
next reply other threads:[~2019-04-08 14:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 14:39 Yue Haibing [this message]
2019-04-09 16:30 ` Vignesh Raghavendra
2019-04-10 3:33 ` YueHaibing
2019-04-10 5:23 ` Naga Sureshkumar Relli
2019-04-10 5:31 ` Naga Sureshkumar Relli
2019-04-10 12:13 ` [PATCH v2] " Yue Haibing
2019-04-10 12:20 ` YueHaibing
2019-04-10 12:26 ` Applied "spi: spi-mem: Fix build error without CONFIG_SPI_MEM" to the spi tree Mark Brown
2019-05-02 2:19 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190408143949.10688-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=naga.sureshkumar.relli@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®