From: Jingoo Han Date: Sat, 6 Apr 2013 06:41:32 +0000 (+0900) Subject: mtd: m25p80: use spi_get_drvdata() and spi_set_drvdata() X-Git-Tag: next-20130607~62^2~26 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0d3414286536ebb2e29a06f0191b6e196bd443f9;p=karo-tx-linux.git mtd: m25p80: use spi_get_drvdata() and spi_set_drvdata() Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 2f3d2a5ff349..d2232e7568d3 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -972,7 +972,7 @@ static int m25p_probe(struct spi_device *spi) flash->spi = spi; mutex_init(&flash->lock); - dev_set_drvdata(&spi->dev, flash); + spi_set_drvdata(spi, flash); /* * Atmel, SST and Intel/Numonyx serial flash tend to power @@ -1080,7 +1080,7 @@ static int m25p_probe(struct spi_device *spi) static int m25p_remove(struct spi_device *spi) { - struct m25p *flash = dev_get_drvdata(&spi->dev); + struct m25p *flash = spi_get_drvdata(spi); int status; /* Clean up MTD stuff. */