diff options
| author | Dave Airlie <airlied@redhat.com> | 2010-05-18 19:35:51 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 19:35:51 -0400 |
| commit | 05ea893c46805b2981ea8ba6df881e3d65edd63b (patch) | |
| tree | ea381e22d99f49bd2c95238f88491d48b797a17b /drivers/spi | |
| parent | 26481fb15644b5fd85d4cea020f74a234cdf6803 (diff) | |
| parent | a7c542782e92f9487c62a571565637be3d6b0ffd (diff) | |
Merge remote branch 'anholt/drm-intel-next' into drm-next
* anholt/drm-intel-next: (515 commits)
drm/i915: Fix out of tree builds
drm/i915: move fence lru to struct drm_i915_fence_reg
drm/i915: don't allow tiling changes on pinned buffers v2
drm/i915: Be extra careful about A/D matching for multifunction SDVO
drm/i915: Fix DDC bus selection for multifunction SDVO
drm/i915: cleanup mode setting before unmapping registers
drm/i915: Make fbc control wrapper functions
drm/i915: Wait for the GPU whilst shrinking, if truly desperate.
drm/i915: Use spatio-temporal dithering on PCH
[MTD] Remove zero-length files mtdbdi.c and internal.ho
pata_pcmcia / ide-cs: Fix bad hashes for Transcend and kingston IDs
libata: Fix several inaccuracies in developer's guide
slub: Fix bad boundary check in init_kmem_cache_nodes()
raid6: fix recovery performance regression
KEYS: call_sbin_request_key() must write lock keyrings before modifying them
KEYS: Use RCU dereference wrappers in keyring key type code
KEYS: find_keyring_by_name() can gain access to a freed keyring
ALSA: hda: Fix 0 dB for Packard Bell models using Conexant CX20549 (Venice)
ALSA: hda - Add quirk for Dell Inspiron 19T using a Conexant CX20582
ALSA: take tu->qlock with irqs disabled
...
Diffstat (limited to 'drivers/spi')
| -rw-r--r-- | drivers/spi/omap2_mcspi.c | 5 | ||||
| -rw-r--r-- | drivers/spi/spi.c | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index d8356af118a8..e0de0d0eedea 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c | |||
| @@ -204,6 +204,7 @@ static inline void mcspi_write_chconf0(const struct spi_device *spi, u32 val) | |||
| 204 | 204 | ||
| 205 | cs->chconf0 = val; | 205 | cs->chconf0 = val; |
| 206 | mcspi_write_cs_reg(spi, OMAP2_MCSPI_CHCONF0, val); | 206 | mcspi_write_cs_reg(spi, OMAP2_MCSPI_CHCONF0, val); |
| 207 | mcspi_read_cs_reg(spi, OMAP2_MCSPI_CHCONF0); | ||
| 207 | } | 208 | } |
| 208 | 209 | ||
| 209 | static void omap2_mcspi_set_dma_req(const struct spi_device *spi, | 210 | static void omap2_mcspi_set_dma_req(const struct spi_device *spi, |
| @@ -532,7 +533,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer) | |||
| 532 | goto out; | 533 | goto out; |
| 533 | } | 534 | } |
| 534 | #ifdef VERBOSE | 535 | #ifdef VERBOSE |
| 535 | dev_dbg(&spi->dev, "write-%d %04x\n", | 536 | dev_dbg(&spi->dev, "write-%d %08x\n", |
| 536 | word_len, *tx); | 537 | word_len, *tx); |
| 537 | #endif | 538 | #endif |
| 538 | __raw_writel(*tx++, tx_reg); | 539 | __raw_writel(*tx++, tx_reg); |
| @@ -550,7 +551,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer) | |||
| 550 | mcspi_write_chconf0(spi, l); | 551 | mcspi_write_chconf0(spi, l); |
| 551 | *rx++ = __raw_readl(rx_reg); | 552 | *rx++ = __raw_readl(rx_reg); |
| 552 | #ifdef VERBOSE | 553 | #ifdef VERBOSE |
| 553 | dev_dbg(&spi->dev, "read-%d %04x\n", | 554 | dev_dbg(&spi->dev, "read-%d %08x\n", |
| 554 | word_len, *(rx - 1)); | 555 | word_len, *(rx - 1)); |
| 555 | #endif | 556 | #endif |
| 556 | } | 557 | } |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 9ffb0fdbd6fe..b3a1f9259b62 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
| @@ -41,7 +41,7 @@ static void spidev_release(struct device *dev) | |||
| 41 | spi->master->cleanup(spi); | 41 | spi->master->cleanup(spi); |
| 42 | 42 | ||
| 43 | spi_master_put(spi->master); | 43 | spi_master_put(spi->master); |
| 44 | kfree(dev); | 44 | kfree(spi); |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | static ssize_t | 47 | static ssize_t |
| @@ -257,6 +257,7 @@ int spi_add_device(struct spi_device *spi) | |||
| 257 | { | 257 | { |
| 258 | static DEFINE_MUTEX(spi_add_lock); | 258 | static DEFINE_MUTEX(spi_add_lock); |
| 259 | struct device *dev = spi->master->dev.parent; | 259 | struct device *dev = spi->master->dev.parent; |
| 260 | struct device *d; | ||
| 260 | int status; | 261 | int status; |
| 261 | 262 | ||
| 262 | /* Chipselects are numbered 0..max; validate. */ | 263 | /* Chipselects are numbered 0..max; validate. */ |
| @@ -278,10 +279,11 @@ int spi_add_device(struct spi_device *spi) | |||
| 278 | */ | 279 | */ |
| 279 | mutex_lock(&spi_add_lock); | 280 | mutex_lock(&spi_add_lock); |
| 280 | 281 | ||
| 281 | if (bus_find_device_by_name(&spi_bus_type, NULL, dev_name(&spi->dev)) | 282 | d = bus_find_device_by_name(&spi_bus_type, NULL, dev_name(&spi->dev)); |
| 282 | != NULL) { | 283 | if (d != NULL) { |
| 283 | dev_err(dev, "chipselect %d already in use\n", | 284 | dev_err(dev, "chipselect %d already in use\n", |
| 284 | spi->chip_select); | 285 | spi->chip_select); |
| 286 | put_device(d); | ||
| 285 | status = -EBUSY; | 287 | status = -EBUSY; |
| 286 | goto done; | 288 | goto done; |
| 287 | } | 289 | } |
