diff options
author | Baruch Siach <baruch@tkos.co.il> | 2013-12-30 13:30:44 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-31 07:30:18 -0500 |
commit | 04f421e7b0b10de3fae543dac4d324b449a1db6b (patch) | |
tree | cdbb475e66a2ac6bc755d83f04eeabaf43569cbb /drivers/spi/spi-dw.h | |
parent | 0a47d3c40428fb8174ea36ede35267ddc7042f34 (diff) |
spi: dw: use managed resources
Migrate mmio code and core driver to managed resources to reduce boilerplate
error handling code. Also, handle clk_enable() failure while at it, and drop
unused dw_spi iolen field.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-dw.h')
-rw-r--r-- | drivers/spi/spi-dw.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h index 5a5cd02ddb13..587643dae11e 100644 --- a/drivers/spi/spi-dw.h +++ b/drivers/spi/spi-dw.h | |||
@@ -92,13 +92,11 @@ struct dw_spi_dma_ops { | |||
92 | struct dw_spi { | 92 | struct dw_spi { |
93 | struct spi_master *master; | 93 | struct spi_master *master; |
94 | struct spi_device *cur_dev; | 94 | struct spi_device *cur_dev; |
95 | struct device *parent_dev; | ||
96 | enum dw_ssi_type type; | 95 | enum dw_ssi_type type; |
97 | char name[16]; | 96 | char name[16]; |
98 | 97 | ||
99 | void __iomem *regs; | 98 | void __iomem *regs; |
100 | unsigned long paddr; | 99 | unsigned long paddr; |
101 | u32 iolen; | ||
102 | int irq; | 100 | int irq; |
103 | u32 fifo_len; /* depth of the FIFO buffer */ | 101 | u32 fifo_len; /* depth of the FIFO buffer */ |
104 | u32 max_freq; /* max bus freq supported */ | 102 | u32 max_freq; /* max bus freq supported */ |
@@ -230,7 +228,7 @@ struct dw_spi_chip { | |||
230 | void (*cs_control)(u32 command); | 228 | void (*cs_control)(u32 command); |
231 | }; | 229 | }; |
232 | 230 | ||
233 | extern int dw_spi_add_host(struct dw_spi *dws); | 231 | extern int dw_spi_add_host(struct device *dev, struct dw_spi *dws); |
234 | extern void dw_spi_remove_host(struct dw_spi *dws); | 232 | extern void dw_spi_remove_host(struct dw_spi *dws); |
235 | extern int dw_spi_suspend_host(struct dw_spi *dws); | 233 | extern int dw_spi_suspend_host(struct dw_spi *dws); |
236 | extern int dw_spi_resume_host(struct dw_spi *dws); | 234 | extern int dw_spi_resume_host(struct dw_spi *dws); |