Skip to content

Commit

Permalink
spi: spi-mem: export spi_mem_default_supports_op()
Browse files Browse the repository at this point in the history
Export spi_mem_default_supports_op(), so that controller drivers
can use this.
spi-mem driver already exports this using EXPORT_SYMBOL,
but not declared it in spi-mem.h.
This patch declares spi_mem_default_supports_op() in spi-mem.h and
also removes the static from the function prototype.

Signed-off-by: Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Naga Sureshkumar Relli authored and Mark Brown committed Apr 3, 2019

Unverified

No user is associated with the committer email.
1 parent 5a4df21 commit 4610964
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/spi/spi-mem.c
Original file line number Diff line number Diff line change
@@ -135,8 +135,8 @@ static int spi_check_buswidth_req(struct spi_mem *mem, u8 buswidth, bool tx)
return -ENOTSUPP;
}

static bool spi_mem_default_supports_op(struct spi_mem *mem,
const struct spi_mem_op *op)
bool spi_mem_default_supports_op(struct spi_mem *mem,
const struct spi_mem_op *op)
{
if (spi_check_buswidth_req(mem, op->cmd.buswidth, true))
return false;
3 changes: 3 additions & 0 deletions include/linux/spi/spi-mem.h
Original file line number Diff line number Diff line change
@@ -341,6 +341,9 @@ 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)

0 comments on commit 4610964

Please sign in to comment.