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
/
maps
/
ichxrom.c
diff --git
a/drivers/mtd/maps/ichxrom.c
b/drivers/mtd/maps/ichxrom.c
index
29d1cc1
..
2bb3e63
100644
(file)
--- a/
drivers/mtd/maps/ichxrom.c
+++ b/
drivers/mtd/maps/ichxrom.c
@@
-2,7
+2,7
@@
* ichxrom.c
*
* Normal mappings of chips in physical memory
* ichxrom.c
*
* Normal mappings of chips in physical memory
- * $Id: ichxrom.c,v 1.1
6 2004/11/28 09:40:39 dwmw2
Exp $
+ * $Id: ichxrom.c,v 1.1
9 2005/11/07 11:14:27 gleixner
Exp $
*/
#include <linux/module.h>
*/
#include <linux/module.h>
@@
-14,7
+14,6
@@
#include <linux/mtd/map.h>
#include <linux/mtd/cfi.h>
#include <linux/mtd/flashchip.h>
#include <linux/mtd/map.h>
#include <linux/mtd/cfi.h>
#include <linux/mtd/flashchip.h>
-#include <linux/config.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/list.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/list.h>
@@
-62,6
+61,7
@@
static void ichxrom_cleanup(struct ichxrom_window *window)
/* Disable writes through the rom window */
pci_read_config_word(window->pdev, BIOS_CNTL, &word);
pci_write_config_word(window->pdev, BIOS_CNTL, word & ~1);
/* Disable writes through the rom window */
pci_read_config_word(window->pdev, BIOS_CNTL, &word);
pci_write_config_word(window->pdev, BIOS_CNTL, word & ~1);
+ pci_dev_put(window->pdev);
/* Free all of the mtd devices */
list_for_each_entry_safe(map, scratch, &window->maps, list) {
/* Free all of the mtd devices */
list_for_each_entry_safe(map, scratch, &window->maps, list) {
@@
-101,7
+101,7
@@
static int __devinit ichxrom_init_one (struct pci_dev *pdev,
* you can only really attach a FWH to an ICHX there
* a number of simplifications you can make.
*
* you can only really attach a FWH to an ICHX there
* a number of simplifications you can make.
*
- * Also you can page firmware hubs if an 8MB window isn't enough
+ * Also you can page firmware hubs if an 8MB window isn't enough
* but don't currently handle that case either.
*/
window->pdev = pdev;
* but don't currently handle that case either.
*/
window->pdev = pdev;
@@
-144,7
+144,7
@@
static int __devinit ichxrom_init_one (struct pci_dev *pdev,
window->phys = 0xfff00000;
}
else if ((byte & 0x80) == 0x80) {
window->phys = 0xfff00000;
}
else if ((byte & 0x80) == 0x80) {
- window->phys = 0xfff80000;
+ window->phys = 0xfff80000;
}
if (window->phys == 0) {
}
if (window->phys == 0) {
@@
-177,9
+177,10
@@
static int __devinit ichxrom_init_one (struct pci_dev *pdev,
window->rsrc.parent = NULL;
printk(KERN_DEBUG MOD_NAME
": %s(): Unable to register resource"
window->rsrc.parent = NULL;
printk(KERN_DEBUG MOD_NAME
": %s(): Unable to register resource"
- " 0x%.
08lx-0x%.08
lx - kernel bug?\n",
+ " 0x%.
16llx-0x%.16l
lx - kernel bug?\n",
__func__,
__func__,
- window->rsrc.start, window->rsrc.end);
+ (unsigned long long)window->rsrc.start,
+ (unsigned long long)window->rsrc.end);
}
/* Map the firmware hub into my address space. */
}
/* Map the firmware hub into my address space. */
@@
-233,7
+234,7
@@
static int __devinit ichxrom_init_one (struct pci_dev *pdev,
* in a factory setting. So in-place programming
* needs to use a different method.
*/
* in a factory setting. So in-place programming
* needs to use a different method.
*/
- for(map->map.bankwidth = 32; map->map.bankwidth;
+ for(map->map.bankwidth = 32; map->map.bankwidth;
map->map.bankwidth >>= 1)
{
char **probe_type;
map->map.bankwidth >>= 1)
{
char **probe_type;
@@
-286,7
+287,7
@@
static int __devinit ichxrom_init_one (struct pci_dev *pdev,
for(i = 0; i < cfi->numchips; i++) {
cfi->chips[i].start += offset;
}
for(i = 0; i < cfi->numchips; i++) {
cfi->chips[i].start += offset;
}
-
+
/* Now that the mtd devices is complete claim and export it */
map->mtd->owner = THIS_MODULE;
if (add_mtd_device(map->mtd)) {
/* Now that the mtd devices is complete claim and export it */
map->mtd->owner = THIS_MODULE;
if (add_mtd_device(map->mtd)) {
@@
-306,9
+307,8
@@
static int __devinit ichxrom_init_one (struct pci_dev *pdev,
out:
/* Free any left over map structures */
out:
/* Free any left over map structures */
- if (map) {
- kfree(map);
- }
+ kfree(map);
+
/* See if I have any map structures */
if (list_empty(&window->maps)) {
ichxrom_cleanup(window);
/* See if I have any map structures */
if (list_empty(&window->maps)) {
ichxrom_cleanup(window);
@@
-325,11
+325,11
@@
static void __devexit ichxrom_remove_one (struct pci_dev *pdev)
}
static struct pci_device_id ichxrom_pci_tbl[] __devinitdata = {
}
static struct pci_device_id ichxrom_pci_tbl[] __devinitdata = {
- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0,
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0,
PCI_ANY_ID, PCI_ANY_ID, },
PCI_ANY_ID, PCI_ANY_ID, },
- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,
PCI_ANY_ID, PCI_ANY_ID, },
PCI_ANY_ID, PCI_ANY_ID, },
- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0,
+ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0,
PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0,
PCI_ANY_ID, PCI_ANY_ID, },
PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0,
PCI_ANY_ID, PCI_ANY_ID, },
@@
-338,9
+338,9
@@
static struct pci_device_id ichxrom_pci_tbl[] __devinitdata = {
{ 0, },
};
{ 0, },
};
+#if 0
MODULE_DEVICE_TABLE(pci, ichxrom_pci_tbl);
MODULE_DEVICE_TABLE(pci, ichxrom_pci_tbl);
-#if 0
static struct pci_driver ichxrom_driver = {
.name = MOD_NAME,
.id_table = ichxrom_pci_tbl,
static struct pci_driver ichxrom_driver = {
.name = MOD_NAME,
.id_table = ichxrom_pci_tbl,
@@
-356,7
+356,7
@@
static int __init init_ichxrom(void)
pdev = NULL;
for (id = ichxrom_pci_tbl; id->vendor; id++) {
pdev = NULL;
for (id = ichxrom_pci_tbl; id->vendor; id++) {
- pdev = pci_
find
_device(id->vendor, id->device, NULL);
+ pdev = pci_
get
_device(id->vendor, id->device, NULL);
if (pdev) {
break;
}
if (pdev) {
break;
}
@@
-366,7
+366,7
@@
static int __init init_ichxrom(void)
}
return -ENXIO;
#if 0
}
return -ENXIO;
#if 0
- return pci_
module_init
(&ichxrom_driver);
+ return pci_
register_driver
(&ichxrom_driver);
#endif
}
#endif
}