* [PATCH v2] spi-imx: Remove duplicate spi_imx_data definition
@ 2012-03-26 19:10 Fabio Estevam
0 siblings, 0 replies; only message in thread
From: Fabio Estevam @ 2012-03-26 19:10 UTC (permalink / raw)
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Cc: Fabio Estevam, omaplinuxkernel-Re5JQEeQqe8AvxtiuMwx3w,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ
Structure struct spi_imx_data is defined twice.
Remove one of its definition.
In order to do so, it is also necessary to move spi_imx_devtype_data
structure after the definition of spi_imx_data.
Signed-off-by: Fabio Estevam <fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
Changes since v1:
- Explain why I moved spi_imx_devtype_data location
drivers/spi/spi-imx.c | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 31054e3..f1f6700 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -68,17 +68,6 @@ enum spi_imx_devtype {
IMX51_ECSPI, /* ECSPI on i.mx51 and later */
};
-struct spi_imx_data;
-
-struct spi_imx_devtype_data {
- void (*intctrl)(struct spi_imx_data *, int);
- int (*config)(struct spi_imx_data *, struct spi_imx_config *);
- void (*trigger)(struct spi_imx_data *);
- int (*rx_available)(struct spi_imx_data *);
- void (*reset)(struct spi_imx_data *);
- enum spi_imx_devtype devtype;
-};
-
struct spi_imx_data {
struct spi_bitbang bitbang;
@@ -99,6 +88,15 @@ struct spi_imx_data {
int chipselect[0];
};
+struct spi_imx_devtype_data {
+ void (*intctrl)(struct spi_imx_data *, int);
+ int (*config)(struct spi_imx_data *, struct spi_imx_config *);
+ void (*trigger)(struct spi_imx_data *);
+ int (*rx_available)(struct spi_imx_data *);
+ void (*reset)(struct spi_imx_data *);
+ enum spi_imx_devtype devtype;
+};
+
static inline int is_imx27_cspi(struct spi_imx_data *d)
{
return d->devtype_data->devtype == IMX27_CSPI;
--
1.7.1
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-26 19:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-26 19:10 [PATCH v2] spi-imx: Remove duplicate spi_imx_data definition Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).