git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
mtd
/
devices
/
mtd_dataflash.c
diff --git
a/drivers/mtd/devices/mtd_dataflash.c
b/drivers/mtd/devices/mtd_dataflash.c
index
a19480d
..
a987e91
100644
(file)
--- a/
drivers/mtd/devices/mtd_dataflash.c
+++ b/
drivers/mtd/devices/mtd_dataflash.c
@@
-9,7
+9,6
@@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
@@
-460,7
+459,7
@@
add_dataflash(struct spi_device *spi, char *name,
struct mtd_info *device;
struct flash_platform_data *pdata = spi->dev.platform_data;
struct mtd_info *device;
struct flash_platform_data *pdata = spi->dev.platform_data;
- priv =
(struct dataflash *)
kzalloc(sizeof *priv, GFP_KERNEL);
+ priv = kzalloc(sizeof *priv, GFP_KERNEL);
if (!priv)
return -ENOMEM;
if (!priv)
return -ENOMEM;
@@
-478,9
+477,10
@@
add_dataflash(struct spi_device *spi, char *name,
device->name = (pdata && pdata->name) ? pdata->name : priv->name;
device->size = nr_pages * pagesize;
device->erasesize = pagesize;
device->name = (pdata && pdata->name) ? pdata->name : priv->name;
device->size = nr_pages * pagesize;
device->erasesize = pagesize;
+ device->writesize = pagesize;
device->owner = THIS_MODULE;
device->type = MTD_DATAFLASH;
device->owner = THIS_MODULE;
device->type = MTD_DATAFLASH;
- device->flags = MTD_
CAP_NORFLASH
;
+ device->flags = MTD_
WRITEABLE
;
device->erase = dataflash_erase;
device->read = dataflash_read;
device->write = dataflash_write;
device->erase = dataflash_erase;
device->read = dataflash_read;
device->write = dataflash_write;
@@
-536,7
+536,7
@@
static int __devinit dataflash_probe(struct spi_device *spi)
if (status <= 0 || status == 0xff) {
DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n",
spi->dev.bus_id, status);
if (status <= 0 || status == 0xff) {
DEBUG(MTD_DEBUG_LEVEL1, "%s: status error %d\n",
spi->dev.bus_id, status);
- if (status == 0xff)
+ if (status == 0
|| status == 0
xff)
status = -ENODEV;
return status;
}
status = -ENODEV;
return status;
}