提交 975aefc9 编写于 作者: J Jingoo Han 提交者: David Woodhouse

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: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 5cacbfa9
...@@ -972,7 +972,7 @@ static int m25p_probe(struct spi_device *spi) ...@@ -972,7 +972,7 @@ static int m25p_probe(struct spi_device *spi)
flash->spi = spi; flash->spi = spi;
mutex_init(&flash->lock); 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 * Atmel, SST and Intel/Numonyx serial flash tend to power
...@@ -1080,7 +1080,7 @@ static int m25p_probe(struct spi_device *spi) ...@@ -1080,7 +1080,7 @@ static int m25p_probe(struct spi_device *spi)
static int m25p_remove(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; int status;
/* Clean up MTD stuff. */ /* Clean up MTD stuff. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部