diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-06 02:41:32 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-05 14:05:45 -0400 |
commit | 975aefc9de7ab893e9e784ec52cf97e1827259da (patch) | |
tree | 3709b00188538cffb2c16aef6fe7de1be55a9b8a /drivers/mtd/devices/m25p80.c | |
parent | 5cacbfa9fe263b7f65a8efdf68bf14754c3d250a (diff) |
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 <jg1.han@samsung.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/devices/m25p80.c')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
972 | 972 | ||
973 | flash->spi = spi; | 973 | flash->spi = spi; |
974 | mutex_init(&flash->lock); | 974 | mutex_init(&flash->lock); |
975 | dev_set_drvdata(&spi->dev, flash); | 975 | spi_set_drvdata(spi, flash); |
976 | 976 | ||
977 | /* | 977 | /* |
978 | * Atmel, SST and Intel/Numonyx serial flash tend to power | 978 | * Atmel, SST and Intel/Numonyx serial flash tend to power |
@@ -1080,7 +1080,7 @@ static int m25p_probe(struct spi_device *spi) | |||
1080 | 1080 | ||
1081 | static int m25p_remove(struct spi_device *spi) | 1081 | static int m25p_remove(struct spi_device *spi) |
1082 | { | 1082 | { |
1083 | struct m25p *flash = dev_get_drvdata(&spi->dev); | 1083 | struct m25p *flash = spi_get_drvdata(spi); |
1084 | int status; | 1084 | int status; |
1085 | 1085 | ||
1086 | /* Clean up MTD stuff. */ | 1086 | /* Clean up MTD stuff. */ |