diff mbox series

[1/6] sandbox: spi: Drop unused sandbox_spi_parse_spec function

Message ID 20201206212128.21233-2-ovidiu.panait@windriver.com
State Superseded
Delegated to: Simon Glass
Headers show
Series spi: spi-uclass: Fix spi_claim_bus() speed/mode setup logic | expand

Commit Message

Ovidiu Panait Dec. 6, 2020, 9:21 p.m. UTC
Commit 1289e96797bf ("sandbox: spi: Drop command-line SPI option") dropped
support for specifying SPI devices on the command line, removing the only
user of sandbox_spi_parse_spec(). Remove the function too.

Fixes: 1289e96797bf ("sandbox: spi: Drop command-line SPI option")
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
---

 arch/sandbox/include/asm/spi.h | 10 ----------
 drivers/spi/sandbox_spi.c      | 16 ----------------
 2 files changed, 26 deletions(-)

Comments

Simon Glass Dec. 12, 2020, 3:39 p.m. UTC | #1
On Sun, 6 Dec 2020 at 14:23, Ovidiu Panait <ovidiu.panait@windriver.com> wrote:
>
> Commit 1289e96797bf ("sandbox: spi: Drop command-line SPI option") dropped
> support for specifying SPI devices on the command line, removing the only
> user of sandbox_spi_parse_spec(). Remove the function too.
>
> Fixes: 1289e96797bf ("sandbox: spi: Drop command-line SPI option")
> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
> ---
>
>  arch/sandbox/include/asm/spi.h | 10 ----------
>  drivers/spi/sandbox_spi.c      | 16 ----------------
>  2 files changed, 26 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/arch/sandbox/include/asm/spi.h b/arch/sandbox/include/asm/spi.h
index 98e1826e2c..e8268bbe07 100644
--- a/arch/sandbox/include/asm/spi.h
+++ b/arch/sandbox/include/asm/spi.h
@@ -32,14 +32,4 @@  struct sandbox_spi_emu_ops {
 	int (*xfer)(void *priv, const u8 *rx, u8 *tx, uint bytes);
 };
 
-/*
- * Extract the bus/cs from the spi spec and return the start of the spi
- * client spec.  If the bus/cs are invalid for the current config, then
- * it returns NULL.
- *
- * Example: arg="0:1:foo" will set bus to 0, cs to 1, and return "foo"
- */
-const char *sandbox_spi_parse_spec(const char *arg, unsigned long *bus,
-				   unsigned long *cs);
-
 #endif
diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c
index 755f176861..3640ddeeb6 100644
--- a/drivers/spi/sandbox_spi.c
+++ b/drivers/spi/sandbox_spi.c
@@ -28,22 +28,6 @@ 
 # define CONFIG_SPI_IDLE_VAL 0xFF
 #endif
 
-const char *sandbox_spi_parse_spec(const char *arg, unsigned long *bus,
-				   unsigned long *cs)
-{
-	char *endp;
-
-	*bus = simple_strtoul(arg, &endp, 0);
-	if (*endp != ':' || *bus >= CONFIG_SANDBOX_SPI_MAX_BUS)
-		return NULL;
-
-	*cs = simple_strtoul(endp + 1, &endp, 0);
-	if (*endp != ':' || *cs >= CONFIG_SANDBOX_SPI_MAX_CS)
-		return NULL;
-
-	return endp + 1;
-}
-
 __weak int sandbox_spi_get_emul(struct sandbox_state *state,
 				struct udevice *bus, struct udevice *slave,
 				struct udevice **emulp)