@@ -1386,7 +1386,7 @@ static int mmc_spi_probe(struct spi_device *spi)
host->powerup_msecs = 250;
}
- dev_set_drvdata(&spi->dev, mmc);
+ spi_set_drvdata(spi, mmc);
/* preallocate dma buffers */
host->data = kmalloc(sizeof(*host->data), GFP_KERNEL);
@@ -1472,7 +1472,7 @@ fail_glue_init:
fail_nobuf1:
mmc_free_host(mmc);
mmc_spi_put_pdata(spi);
- dev_set_drvdata(&spi->dev, NULL);
+ spi_set_drvdata(spi, NULL);
nomem:
kfree(ones);
@@ -1482,7 +1482,7 @@ nomem:
static int mmc_spi_remove(struct spi_device *spi)
{
- struct mmc_host *mmc = dev_get_drvdata(&spi->dev);
+ struct mmc_host *mmc = spi_get_drvdata(spi);
struct mmc_spi_host *host;
if (mmc) {
@@ -1507,7 +1507,7 @@ static int mmc_spi_remove(struct spi_device *spi)
spi->max_speed_hz = mmc->f_max;
mmc_free_host(mmc);
mmc_spi_put_pdata(spi);
- dev_set_drvdata(&spi->dev, NULL);
+ spi_set_drvdata(spi, NULL);
}
return 0;
}