From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: Kumar Gala <galak@kernel.crashing.org>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 06/10] SPI: Renamed bitbang_transfer_setup to spi_bitbang_setup_transfer and export it
Date: Tue, 16 May 2006 14:38:34 -0700 [thread overview]
Message-ID: <11478155182854-git-send-email-greg@kroah.com> (raw)
In-Reply-To: <11478155182390-git-send-email-greg@kroah.com>
From: Kumar Gala <galak@kernel.crashing.org>
Renamed bitbang_transfer_setup to follow convention of other exported symbols
from spi-bitbang. Exported spi_bitbang_setup_transfer to allow users of
spi-bitbang to use the function in their own setup_transfer.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/spi/spi_bitbang.c | 10 ++++++----
include/linux/spi/spi_bitbang.h | 2 ++
2 files changed, 8 insertions(+), 4 deletions(-)
ff9f4771b5f017ee0f57629488b6cd7a6ef3d19b
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c
index 0525c99..6c3da64 100644
--- a/drivers/spi/spi_bitbang.c
+++ b/drivers/spi/spi_bitbang.c
@@ -138,8 +138,7 @@ static unsigned bitbang_txrx_32(
return t->len - count;
}
-static int
-bitbang_transfer_setup(struct spi_device *spi, struct spi_transfer *t)
+int spi_bitbang_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
{
struct spi_bitbang_cs *cs = spi->controller_state;
u8 bits_per_word;
@@ -174,6 +173,7 @@ bitbang_transfer_setup(struct spi_device
return 0;
}
+EXPORT_SYMBOL_GPL(spi_bitbang_setup_transfer);
/**
* spi_bitbang_setup - default setup for per-word I/O loops
@@ -203,7 +203,7 @@ int spi_bitbang_setup(struct spi_device
if (!cs->txrx_word)
return -EINVAL;
- retval = bitbang_transfer_setup(spi, NULL);
+ retval = spi_bitbang_setup_transfer(spi, NULL);
if (retval < 0)
return retval;
@@ -454,7 +454,9 @@ int spi_bitbang_start(struct spi_bitbang
bitbang->use_dma = 0;
bitbang->txrx_bufs = spi_bitbang_bufs;
if (!bitbang->master->setup) {
- bitbang->setup_transfer = bitbang_transfer_setup;
+ if (!bitbang->setup_transfer)
+ bitbang->setup_transfer =
+ spi_bitbang_setup_transfer;
bitbang->master->setup = spi_bitbang_setup;
bitbang->master->cleanup = spi_bitbang_cleanup;
}
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h
index c954557..16ce178 100644
--- a/include/linux/spi/spi_bitbang.h
+++ b/include/linux/spi/spi_bitbang.h
@@ -57,6 +57,8 @@ #define BITBANG_CS_INACTIVE 0
extern int spi_bitbang_setup(struct spi_device *spi);
extern void spi_bitbang_cleanup(const struct spi_device *spi);
extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m);
+extern int spi_bitbang_setup_transfer(struct spi_device *spi,
+ struct spi_transfer *t);
/* start or stop queue processing */
extern int spi_bitbang_start(struct spi_bitbang *spi);
--
1.3.2
next prev parent reply other threads:[~2006-05-16 21:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-16 21:37 [GIT PATCH] SPI patches for 2.6.17-rc4 Greg KH
2006-05-16 21:38 ` [PATCH 01/10] SPI: per-transfer overrides for wordsize and clocking Greg KH
2006-05-16 21:38 ` [PATCH 02/10] SPI: add PXA2xx SSP SPI Driver Greg KH
2006-05-16 21:38 ` [PATCH 03/10] SPI: spi whitespace fixes Greg KH
2006-05-16 21:38 ` [PATCH 04/10] SPI: spi bounce buffer has a minimum length Greg KH
2006-05-16 21:38 ` [PATCH 05/10] SPI: Add David as the SPI subsystem maintainer Greg KH
2006-05-16 21:38 ` Greg KH [this message]
2006-05-16 21:38 ` [PATCH 07/10] SPI: devices can require LSB-first encodings Greg KH
2006-05-16 21:38 ` [PATCH 08/10] SPI: busnum == 0 needs to work Greg KH
2006-05-16 21:38 ` [PATCH 09/10] spi: Update to PXA2xx SPI Driver Greg KH
2005-01-01 0:10 ` Roland Dreier
2006-05-17 1:40 ` Greg KH
2006-05-16 21:38 ` [PATCH 10/10] SPI: spi_bitbang: clocking fixes Greg KH
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=11478155182854-git-send-email-greg@kroah.com \
--to=greg@kroah.com \
--cc=galak@kernel.crashing.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/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