summaryrefslogtreecommitdiff
path: root/drivers/mtd/maps/bast-flash.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:24:08 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:24:08 -0800
commitb3ce1debe2685383a9ad6ace9c49869c3968c013 (patch)
treedcb606fac467d6ce78a9c608a1e0d2323af44f2b /drivers/mtd/maps/bast-flash.c
parent5b2f7ffcb734d3046144dfbd5ac6d76254a9e522 (diff)
parentc2965f1129ee54afcc4ef293ff0f25fa3a7e7392 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6
Some manual fixups for clashing kfree() cleanups etc.
Diffstat (limited to 'drivers/mtd/maps/bast-flash.c')
-rw-r--r--drivers/mtd/maps/bast-flash.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/mtd/maps/bast-flash.c b/drivers/mtd/maps/bast-flash.c
index 8c19d722ac79..b7858eb93534 100644
--- a/drivers/mtd/maps/bast-flash.c
+++ b/drivers/mtd/maps/bast-flash.c
@@ -9,7 +9,7 @@
* 20-Sep-2004 BJD Initial version
* 17-Jan-2005 BJD Add whole device if no partitions found
*
- * $Id: bast-flash.c,v 1.2 2005/01/18 11:13:47 bjd Exp $
+ * $Id: bast-flash.c,v 1.5 2005/11/07 11:14:26 gleixner Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -75,7 +75,7 @@ static void bast_flash_setrw(int to)
local_irq_save(flags);
val = __raw_readb(BAST_VA_CTRL3);
-
+
if (to)
val |= BAST_CPLD_CTRL3_ROMWEN;
else
@@ -93,7 +93,7 @@ static int bast_flash_remove(struct device *dev)
dev_set_drvdata(dev, NULL);
- if (info == NULL)
+ if (info == NULL)
return 0;
if (info->map.virt != NULL)
@@ -110,7 +110,7 @@ static int bast_flash_remove(struct device *dev)
release_resource(info->area);
kfree(info->area);
}
-
+
kfree(info);
return 0;
@@ -137,15 +137,15 @@ static int bast_flash_probe(struct device *dev)
info->map.phys = res->start;
info->map.size = res->end - res->start + 1;
- info->map.name = dev->bus_id;
+ info->map.name = dev->bus_id;
info->map.bankwidth = 2;
-
+
if (info->map.size > AREA_MAXSIZE)
info->map.size = AREA_MAXSIZE;
pr_debug("%s: area %08lx, size %ld\n", __FUNCTION__,
info->map.phys, info->map.size);
-
+
info->area = request_mem_region(res->start, info->map.size,
pdev->name);
if (info->area == NULL) {
@@ -162,7 +162,7 @@ static int bast_flash_probe(struct device *dev)
err = -EIO;
goto exit_error;
}
-
+
simple_map_init(&info->map);
/* enable the write to the flash area */
@@ -187,7 +187,7 @@ static int bast_flash_probe(struct device *dev)
err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0);
if (err > 0) {
err = add_mtd_partitions(info->mtd, info->partitions, err);
- if (err)
+ if (err)
printk(KERN_ERR PFX "cannot add/parse partitions\n");
} else {
err = add_mtd_device(info->mtd);
@@ -205,6 +205,7 @@ static int bast_flash_probe(struct device *dev)
static struct device_driver bast_flash_driver = {
.name = "bast-nor",
+ .owner = THIS_MODULE,
.bus = &platform_bus_type,
.probe = bast_flash_probe,
.remove = bast_flash_remove,