Merge remote-tracking branch 'spi/topic/pdata' into spi-next
This commit is contained in:
commit
3d09da11b5
|
@ -864,7 +864,7 @@ static int davinci_spi_probe(struct platform_device *pdev)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_set_drvdata(&pdev->dev, master);
|
platform_set_drvdata(pdev, master);
|
||||||
|
|
||||||
dspi = spi_master_get_devdata(master);
|
dspi = spi_master_get_devdata(master);
|
||||||
if (dspi == NULL) {
|
if (dspi == NULL) {
|
||||||
|
@ -1044,7 +1044,7 @@ static int davinci_spi_remove(struct platform_device *pdev)
|
||||||
struct spi_master *master;
|
struct spi_master *master;
|
||||||
struct resource *r;
|
struct resource *r;
|
||||||
|
|
||||||
master = dev_get_drvdata(&pdev->dev);
|
master = platform_get_drvdata(pdev);
|
||||||
dspi = spi_master_get_devdata(master);
|
dspi = spi_master_get_devdata(master);
|
||||||
|
|
||||||
spi_bitbang_stop(&dspi->bitbang);
|
spi_bitbang_stop(&dspi->bitbang);
|
||||||
|
|
|
@ -853,7 +853,7 @@ err:
|
||||||
|
|
||||||
static int of_fsl_spi_remove(struct platform_device *ofdev)
|
static int of_fsl_spi_remove(struct platform_device *ofdev)
|
||||||
{
|
{
|
||||||
struct spi_master *master = dev_get_drvdata(&ofdev->dev);
|
struct spi_master *master = platform_get_drvdata(ofdev);
|
||||||
struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(master);
|
struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(master);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|
|
@ -481,7 +481,7 @@ static int mpc52xx_psc_spi_of_probe(struct platform_device *op)
|
||||||
|
|
||||||
static int mpc52xx_psc_spi_of_remove(struct platform_device *op)
|
static int mpc52xx_psc_spi_of_remove(struct platform_device *op)
|
||||||
{
|
{
|
||||||
struct spi_master *master = spi_master_get(dev_get_drvdata(&op->dev));
|
struct spi_master *master = spi_master_get(platform_get_drvdata(op));
|
||||||
struct mpc52xx_psc_spi *mps = spi_master_get_devdata(master);
|
struct mpc52xx_psc_spi *mps = spi_master_get_devdata(master);
|
||||||
|
|
||||||
flush_workqueue(mps->workqueue);
|
flush_workqueue(mps->workqueue);
|
||||||
|
|
|
@ -438,7 +438,7 @@ static int mpc52xx_spi_probe(struct platform_device *op)
|
||||||
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST;
|
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST;
|
||||||
master->dev.of_node = op->dev.of_node;
|
master->dev.of_node = op->dev.of_node;
|
||||||
|
|
||||||
dev_set_drvdata(&op->dev, master);
|
platform_set_drvdata(op, master);
|
||||||
|
|
||||||
ms = spi_master_get_devdata(master);
|
ms = spi_master_get_devdata(master);
|
||||||
ms->master = master;
|
ms->master = master;
|
||||||
|
@ -529,7 +529,7 @@ static int mpc52xx_spi_probe(struct platform_device *op)
|
||||||
|
|
||||||
static int mpc52xx_spi_remove(struct platform_device *op)
|
static int mpc52xx_spi_remove(struct platform_device *op)
|
||||||
{
|
{
|
||||||
struct spi_master *master = spi_master_get(dev_get_drvdata(&op->dev));
|
struct spi_master *master = spi_master_get(platform_get_drvdata(op));
|
||||||
struct mpc52xx_spi *ms = spi_master_get_devdata(master);
|
struct mpc52xx_spi *ms = spi_master_get_devdata(master);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -502,7 +502,7 @@ static int omap1_spi100k_probe(struct platform_device *pdev)
|
||||||
master->mode_bits = MODEBITS;
|
master->mode_bits = MODEBITS;
|
||||||
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);
|
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);
|
||||||
|
|
||||||
dev_set_drvdata(&pdev->dev, master);
|
platform_set_drvdata(pdev, master);
|
||||||
|
|
||||||
spi100k = spi_master_get_devdata(master);
|
spi100k = spi_master_get_devdata(master);
|
||||||
spi100k->master = master;
|
spi100k->master = master;
|
||||||
|
@ -561,7 +561,7 @@ static int omap1_spi100k_remove(struct platform_device *pdev)
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
master = dev_get_drvdata(&pdev->dev);
|
master = platform_get_drvdata(pdev);
|
||||||
spi100k = spi_master_get_devdata(master);
|
spi100k = spi_master_get_devdata(master);
|
||||||
|
|
||||||
spin_lock_irqsave(&spi100k->lock, flags);
|
spin_lock_irqsave(&spi100k->lock, flags);
|
||||||
|
|
|
@ -495,7 +495,7 @@ static int uwire_probe(struct platform_device *pdev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_set_drvdata(&pdev->dev, uwire);
|
platform_set_drvdata(pdev, uwire);
|
||||||
|
|
||||||
uwire->ck = clk_get(&pdev->dev, "fck");
|
uwire->ck = clk_get(&pdev->dev, "fck");
|
||||||
if (IS_ERR(uwire->ck)) {
|
if (IS_ERR(uwire->ck)) {
|
||||||
|
@ -538,7 +538,7 @@ static int uwire_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
static int uwire_remove(struct platform_device *pdev)
|
static int uwire_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct uwire_spi *uwire = dev_get_drvdata(&pdev->dev);
|
struct uwire_spi *uwire = platform_get_drvdata(pdev);
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
// FIXME remove all child devices, somewhere ...
|
// FIXME remove all child devices, somewhere ...
|
||||||
|
|
|
@ -1324,7 +1324,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
|
||||||
master->cleanup = omap2_mcspi_cleanup;
|
master->cleanup = omap2_mcspi_cleanup;
|
||||||
master->dev.of_node = node;
|
master->dev.of_node = node;
|
||||||
|
|
||||||
dev_set_drvdata(&pdev->dev, master);
|
platform_set_drvdata(pdev, master);
|
||||||
|
|
||||||
mcspi = spi_master_get_devdata(master);
|
mcspi = spi_master_get_devdata(master);
|
||||||
mcspi->master = master;
|
mcspi->master = master;
|
||||||
|
@ -1446,7 +1446,7 @@ static int omap2_mcspi_remove(struct platform_device *pdev)
|
||||||
struct omap2_mcspi *mcspi;
|
struct omap2_mcspi *mcspi;
|
||||||
struct omap2_mcspi_dma *dma_channels;
|
struct omap2_mcspi_dma *dma_channels;
|
||||||
|
|
||||||
master = dev_get_drvdata(&pdev->dev);
|
master = platform_get_drvdata(pdev);
|
||||||
mcspi = spi_master_get_devdata(master);
|
mcspi = spi_master_get_devdata(master);
|
||||||
dma_channels = mcspi->dma_channels;
|
dma_channels = mcspi->dma_channels;
|
||||||
|
|
||||||
|
|
|
@ -428,7 +428,7 @@ static int orion_spi_probe(struct platform_device *pdev)
|
||||||
master->transfer_one_message = orion_spi_transfer_one_message;
|
master->transfer_one_message = orion_spi_transfer_one_message;
|
||||||
master->num_chipselect = ORION_NUM_CHIPSELECTS;
|
master->num_chipselect = ORION_NUM_CHIPSELECTS;
|
||||||
|
|
||||||
dev_set_drvdata(&pdev->dev, master);
|
platform_set_drvdata(pdev, master);
|
||||||
|
|
||||||
spi = spi_master_get_devdata(master);
|
spi = spi_master_get_devdata(master);
|
||||||
spi->master = master;
|
spi->master = master;
|
||||||
|
@ -485,7 +485,7 @@ static int orion_spi_remove(struct platform_device *pdev)
|
||||||
struct resource *r;
|
struct resource *r;
|
||||||
struct orion_spi *spi;
|
struct orion_spi *spi;
|
||||||
|
|
||||||
master = dev_get_drvdata(&pdev->dev);
|
master = platform_get_drvdata(pdev);
|
||||||
spi = spi_master_get_devdata(master);
|
spi = spi_master_get_devdata(master);
|
||||||
|
|
||||||
clk_disable_unprepare(spi->clk);
|
clk_disable_unprepare(spi->clk);
|
||||||
|
|
|
@ -394,7 +394,7 @@ static int spi_ppc4xx_of_probe(struct platform_device *op)
|
||||||
if (master == NULL)
|
if (master == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
master->dev.of_node = np;
|
master->dev.of_node = np;
|
||||||
dev_set_drvdata(dev, master);
|
platform_set_drvdata(op, master);
|
||||||
hw = spi_master_get_devdata(master);
|
hw = spi_master_get_devdata(master);
|
||||||
hw->master = spi_master_get(master);
|
hw->master = spi_master_get(master);
|
||||||
hw->dev = dev;
|
hw->dev = dev;
|
||||||
|
@ -542,7 +542,6 @@ request_mem_error:
|
||||||
free_gpios:
|
free_gpios:
|
||||||
free_gpios(hw);
|
free_gpios(hw);
|
||||||
free_master:
|
free_master:
|
||||||
dev_set_drvdata(dev, NULL);
|
|
||||||
spi_master_put(master);
|
spi_master_put(master);
|
||||||
|
|
||||||
dev_err(dev, "initialization failed\n");
|
dev_err(dev, "initialization failed\n");
|
||||||
|
@ -551,11 +550,10 @@ free_master:
|
||||||
|
|
||||||
static int spi_ppc4xx_of_remove(struct platform_device *op)
|
static int spi_ppc4xx_of_remove(struct platform_device *op)
|
||||||
{
|
{
|
||||||
struct spi_master *master = dev_get_drvdata(&op->dev);
|
struct spi_master *master = platform_get_drvdata(op);
|
||||||
struct ppc4xx_spi *hw = spi_master_get_devdata(master);
|
struct ppc4xx_spi *hw = spi_master_get_devdata(master);
|
||||||
|
|
||||||
spi_bitbang_stop(&hw->bitbang);
|
spi_bitbang_stop(&hw->bitbang);
|
||||||
dev_set_drvdata(&op->dev, NULL);
|
|
||||||
release_mem_region(hw->mapbase, hw->mapsize);
|
release_mem_region(hw->mapbase, hw->mapsize);
|
||||||
free_irq(hw->irqnum, hw);
|
free_irq(hw->irqnum, hw);
|
||||||
iounmap(hw->regs);
|
iounmap(hw->regs);
|
||||||
|
|
|
@ -719,7 +719,7 @@ static void rspi_release_dma(struct rspi_data *rspi)
|
||||||
|
|
||||||
static int rspi_remove(struct platform_device *pdev)
|
static int rspi_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct rspi_data *rspi = dev_get_drvdata(&pdev->dev);
|
struct rspi_data *rspi = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
spi_unregister_master(rspi->master);
|
spi_unregister_master(rspi->master);
|
||||||
rspi_release_dma(rspi);
|
rspi_release_dma(rspi);
|
||||||
|
@ -759,7 +759,7 @@ static int rspi_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
rspi = spi_master_get_devdata(master);
|
rspi = spi_master_get_devdata(master);
|
||||||
dev_set_drvdata(&pdev->dev, rspi);
|
platform_set_drvdata(pdev, rspi);
|
||||||
|
|
||||||
rspi->master = master;
|
rspi->master = master;
|
||||||
rspi->addr = ioremap(res->start, resource_size(res));
|
rspi->addr = ioremap(res->start, resource_size(res));
|
||||||
|
|
|
@ -297,7 +297,7 @@ static int hspi_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
hspi = spi_master_get_devdata(master);
|
hspi = spi_master_get_devdata(master);
|
||||||
dev_set_drvdata(&pdev->dev, hspi);
|
platform_set_drvdata(pdev, hspi);
|
||||||
|
|
||||||
/* init hspi */
|
/* init hspi */
|
||||||
hspi->master = master;
|
hspi->master = master;
|
||||||
|
@ -341,7 +341,7 @@ static int hspi_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
static int hspi_remove(struct platform_device *pdev)
|
static int hspi_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct hspi_priv *hspi = dev_get_drvdata(&pdev->dev);
|
struct hspi_priv *hspi = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
|
||||||
|
|
|
@ -434,7 +434,7 @@ static irqreturn_t spi_sh_irq(int irq, void *_ss)
|
||||||
|
|
||||||
static int spi_sh_remove(struct platform_device *pdev)
|
static int spi_sh_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct spi_sh_data *ss = dev_get_drvdata(&pdev->dev);
|
struct spi_sh_data *ss = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
spi_unregister_master(ss->master);
|
spi_unregister_master(ss->master);
|
||||||
destroy_workqueue(ss->workqueue);
|
destroy_workqueue(ss->workqueue);
|
||||||
|
@ -471,7 +471,7 @@ static int spi_sh_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
ss = spi_master_get_devdata(master);
|
ss = spi_master_get_devdata(master);
|
||||||
dev_set_drvdata(&pdev->dev, ss);
|
platform_set_drvdata(pdev, ss);
|
||||||
|
|
||||||
switch (res->flags & IORESOURCE_MEM_TYPE_MASK) {
|
switch (res->flags & IORESOURCE_MEM_TYPE_MASK) {
|
||||||
case IORESOURCE_MEM_8BIT:
|
case IORESOURCE_MEM_8BIT:
|
||||||
|
|
|
@ -1041,7 +1041,7 @@ static int tegra_spi_probe(struct platform_device *pdev)
|
||||||
dev_err(&pdev->dev, "master allocation failed\n");
|
dev_err(&pdev->dev, "master allocation failed\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
dev_set_drvdata(&pdev->dev, master);
|
platform_set_drvdata(pdev, master);
|
||||||
tspi = spi_master_get_devdata(master);
|
tspi = spi_master_get_devdata(master);
|
||||||
|
|
||||||
/* Parse DT */
|
/* Parse DT */
|
||||||
|
@ -1152,7 +1152,7 @@ exit_free_master:
|
||||||
|
|
||||||
static int tegra_spi_remove(struct platform_device *pdev)
|
static int tegra_spi_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct spi_master *master = dev_get_drvdata(&pdev->dev);
|
struct spi_master *master = platform_get_drvdata(pdev);
|
||||||
struct tegra_spi_data *tspi = spi_master_get_devdata(master);
|
struct tegra_spi_data *tspi = spi_master_get_devdata(master);
|
||||||
|
|
||||||
free_irq(tspi->irq, tspi);
|
free_irq(tspi->irq, tspi);
|
||||||
|
|
|
@ -480,7 +480,7 @@ static int tegra_sflash_probe(struct platform_device *pdev)
|
||||||
master->num_chipselect = MAX_CHIP_SELECT;
|
master->num_chipselect = MAX_CHIP_SELECT;
|
||||||
master->bus_num = -1;
|
master->bus_num = -1;
|
||||||
|
|
||||||
dev_set_drvdata(&pdev->dev, master);
|
platform_set_drvdata(pdev, master);
|
||||||
tsd = spi_master_get_devdata(master);
|
tsd = spi_master_get_devdata(master);
|
||||||
tsd->master = master;
|
tsd->master = master;
|
||||||
tsd->dev = &pdev->dev;
|
tsd->dev = &pdev->dev;
|
||||||
|
@ -555,7 +555,7 @@ exit_free_master:
|
||||||
|
|
||||||
static int tegra_sflash_remove(struct platform_device *pdev)
|
static int tegra_sflash_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct spi_master *master = dev_get_drvdata(&pdev->dev);
|
struct spi_master *master = platform_get_drvdata(pdev);
|
||||||
struct tegra_sflash_data *tsd = spi_master_get_devdata(master);
|
struct tegra_sflash_data *tsd = spi_master_get_devdata(master);
|
||||||
|
|
||||||
free_irq(tsd->irq, tsd);
|
free_irq(tsd->irq, tsd);
|
||||||
|
|
|
@ -1089,7 +1089,7 @@ static int tegra_slink_probe(struct platform_device *pdev)
|
||||||
master->num_chipselect = MAX_CHIP_SELECT;
|
master->num_chipselect = MAX_CHIP_SELECT;
|
||||||
master->bus_num = -1;
|
master->bus_num = -1;
|
||||||
|
|
||||||
dev_set_drvdata(&pdev->dev, master);
|
platform_set_drvdata(pdev, master);
|
||||||
tspi = spi_master_get_devdata(master);
|
tspi = spi_master_get_devdata(master);
|
||||||
tspi->master = master;
|
tspi->master = master;
|
||||||
tspi->dev = &pdev->dev;
|
tspi->dev = &pdev->dev;
|
||||||
|
@ -1193,7 +1193,7 @@ exit_free_master:
|
||||||
|
|
||||||
static int tegra_slink_remove(struct platform_device *pdev)
|
static int tegra_slink_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct spi_master *master = dev_get_drvdata(&pdev->dev);
|
struct spi_master *master = platform_get_drvdata(pdev);
|
||||||
struct tegra_slink_data *tspi = spi_master_get_devdata(master);
|
struct tegra_slink_data *tspi = spi_master_get_devdata(master);
|
||||||
|
|
||||||
free_irq(tspi->irq, tspi);
|
free_irq(tspi->irq, tspi);
|
||||||
|
|
Loading…
Reference in New Issue