[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170228040848.9447-3-dmitry.torokhov@gmail.com>
Date: Mon, 27 Feb 2017 20:08:48 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] spi: allow registering empty spi_board_info lists
Many boards form list of spi_board_info entries depending on config,
and it is possible to end up with empty list. Do not report error
in such cases.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
---
drivers/spi/spi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 029864410a5f..ca6cee37a445 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -683,9 +683,6 @@ int spi_register_board_info(struct spi_board_info const *info, unsigned n)
struct boardinfo *bi;
int i;
- if (!n)
- return -EINVAL;
-
for (i = 0; i < n; i++, info++) {
struct spi_master *master;
--
2.11.0.483.g087da7b7c-goog
Powered by blists - more mailing lists