Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / drivers / mtd / devices / m25p80.c
index dbe6a1de2bb822fda74d0af92a9d08ebc7eb30ea..a4e18f6aaa338aade4e9ddde35157a95c4a3e201 100644 (file)
@@ -307,10 +307,18 @@ static int m25p_remove(struct spi_device *spi)
 {
        struct m25p     *flash = spi_get_drvdata(spi);
 
+       spi_nor_restore(&flash->spi_nor);
+
        /* Clean up MTD stuff. */
        return mtd_device_unregister(&flash->spi_nor.mtd);
 }
 
+static void m25p_shutdown(struct spi_device *spi)
+{
+       struct m25p *flash = spi_get_drvdata(spi);
+
+       spi_nor_restore(&flash->spi_nor);
+}
 /*
  * Do NOT add to this array without reading the following:
  *
@@ -386,6 +394,7 @@ static struct spi_driver m25p80_driver = {
        .id_table       = m25p_ids,
        .probe  = m25p_probe,
        .remove = m25p_remove,
+       .shutdown       = m25p_shutdown,
 
        /* REVISIT: many of these chips have deep power-down modes, which
         * should clearly be entered on suspend() to minimize power use.