[PATCH] I2O: second code cleanup of sparse warnings and unneeded syncronization

Changes:
 - Added header "core.h" for i2o_core.ko internal definitions
 - More sparse fixes
 - Changed display of TID's in sysfs attributes from XXX to 0xXXX
 - Use the right functions for accessing I/O and normal memory
 - Removed error handling of SCSI device errors and let the SCSI layer
   take care of it
 - Added new device / removed device handling to SCSI-OSM
 - Make status access volatile
 - Cleaned up activation of I2O controller
 - Removed unnecessary wmb() and rmb() calls
 - Use own struct i2o_io for I/O memory instead of struct i2o_dma

Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
index 964fe48..442e345 100644
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -30,15 +30,7 @@
 #include <linux/pci.h>
 #include <linux/interrupt.h>
 #include <linux/i2o.h>
-
-/* Module internal functions from other sources */
-extern struct i2o_controller *i2o_iop_alloc(void);
-extern void i2o_iop_free(struct i2o_controller *);
-
-extern int i2o_iop_add(struct i2o_controller *);
-extern void i2o_iop_remove(struct i2o_controller *);
-
-extern int i2o_driver_dispatch(struct i2o_controller *, u32);
+#include "core.h"
 
 /* PCI device id table for all I2O controllers */
 static struct pci_device_id __devinitdata i2o_pci_ids[] = {
@@ -248,9 +240,7 @@
 	struct pci_dev *pdev = c->pdev;
 	int rc;
 
-	wmb();
 	writel(0xffffffff, c->irq_mask);
-	wmb();
 
 	if (pdev->irq) {
 		rc = request_irq(pdev->irq, i2o_pci_interrupt, SA_SHIRQ,
@@ -263,7 +253,6 @@
 	}
 
 	writel(0x00000000, c->irq_mask);
-	wmb();
 
 	printk(KERN_INFO "%s: Installed at IRQ %d\n", c->name, pdev->irq);
 
@@ -278,9 +267,7 @@
  */
 static void i2o_pci_irq_disable(struct i2o_controller *c)
 {
-	wmb();
 	writel(0xffffffff, c->irq_mask);
-	wmb();
 
 	if (c->pdev->irq > 0)
 		free_irq(c->pdev->irq, c);
@@ -406,11 +393,11 @@
 	if ((rc = i2o_iop_add(c)))
 		goto uninstall;
 
+	get_device(&c->device);
+
 	if (i960)
 		pci_write_config_word(i960, 0x42, 0x03ff);
 
-	get_device(&c->device);
-
 	return 0;
 
       uninstall:
@@ -478,6 +465,4 @@
 {
 	pci_unregister_driver(&i2o_pci_driver);
 };
-
-EXPORT_SYMBOL(i2o_dma_realloc);
 MODULE_DEVICE_TABLE(pci, i2o_pci_ids);