Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307652
b: refs/heads/master
c: 1e8a52e
h: refs/heads/master
v: v3
  • Loading branch information
Grant Likely committed May 20, 2012
1 parent b91efa3 commit 588193e
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 14 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: 71422f9e68d43f3fbc6c8939ca8d1b80aa2e4d1a
refs/heads/master: 1e8a52e18cfb381bc9cc1f0b720540364d2a6edd
3 changes: 0 additions & 3 deletions trunk/drivers/spi/spi-ath79.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ static __devinit int ath79_spi_probe(struct platform_device *pdev)
if (pdata) {
master->bus_num = pdata->bus_num;
master->num_chipselect = pdata->num_chipselect;
} else {
master->bus_num = -1;
master->num_chipselect = 1;
}

sp->bitbang.master = spi_master_get(master);
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/spi/spi-lm70llp.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,6 @@ static void spi_lm70llp_attach(struct parport *p)
}
pp = spi_master_get_devdata(master);

master->bus_num = -1; /* dynamic alloc of a bus number */
master->num_chipselect = 1;

/*
* SPI and bitbang hookup.
*/
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/spi/spi-mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ static int __devinit mpc52xx_spi_probe(struct platform_device *op)
goto err_alloc;
}

master->bus_num = -1;
master->setup = mpc52xx_spi_setup;
master->transfer = mpc52xx_spi_transfer;
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST;
Expand Down Expand Up @@ -479,8 +478,6 @@ static int __devinit mpc52xx_spi_probe(struct platform_device *op)
gpio_direction_output(gpio_cs, 1);
ms->gpio_cs[i] = gpio_cs;
}
} else {
master->num_chipselect = 1;
}

spin_lock_init(&ms->lock);
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/spi/spi-ppc4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,6 @@ static int __init spi_ppc4xx_of_probe(struct platform_device *op)
bbp->master->setup = spi_ppc4xx_setup;
bbp->master->cleanup = spi_ppc4xx_cleanup;

/* Allocate bus num dynamically. */
bbp->master->bus_num = -1;

/* the spi->mode bits understood by this driver: */
bbp->master->mode_bits =
SPI_CPHA | SPI_CPOL | SPI_CS_HIGH | SPI_LSB_FIRST;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/spi/spi-topcliff-pch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,6 @@ static int __devinit pch_spi_pd_probe(struct platform_device *plat_dev)
plat_dev->id, data->io_remap_addr);

/* initialize members of SPI master */
master->bus_num = -1;
master->num_chipselect = PCH_MAX_CS;
master->setup = pch_spi_setup;
master->transfer = pch_spi_transfer;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,8 @@ struct spi_master *spi_alloc_master(struct device *dev, unsigned size)
return NULL;

device_initialize(&master->dev);
master->bus_num = -1;
master->num_chipselect = 1;
master->dev.class = &spi_master_class;
master->dev.parent = get_device(dev);
spi_master_set_devdata(master, &master[1]);
Expand Down

0 comments on commit 588193e

Please sign in to comment.