Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190432
b: refs/heads/master
c: 8ec130a
h: refs/heads/master
v: v3
  • Loading branch information
Roman Tereshonkov authored and Grant Likely committed Apr 28, 2010
1 parent 0c477f0 commit dc1e33e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bd73715a1f83f640937c121d22fa8dbaab73002
refs/heads/master: 8ec130a017ebd8b931344edde7013ffb18fa1965
6 changes: 4 additions & 2 deletions trunk/drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ int spi_add_device(struct spi_device *spi)
{
static DEFINE_MUTEX(spi_add_lock);
struct device *dev = spi->master->dev.parent;
struct device *d;
int status;

/* Chipselects are numbered 0..max; validate. */
Expand All @@ -278,10 +279,11 @@ int spi_add_device(struct spi_device *spi)
*/
mutex_lock(&spi_add_lock);

if (bus_find_device_by_name(&spi_bus_type, NULL, dev_name(&spi->dev))
!= NULL) {
d = bus_find_device_by_name(&spi_bus_type, NULL, dev_name(&spi->dev));
if (d != NULL) {
dev_err(dev, "chipselect %d already in use\n",
spi->chip_select);
put_device(d);
status = -EBUSY;
goto done;
}
Expand Down

0 comments on commit dc1e33e

Please sign in to comment.