Index: linux-2.6.14/drivers/i2c/busses/i2c-pxa.c
===================================================================
--- linux-2.6.14.orig/drivers/i2c/busses/i2c-pxa.c	2005-11-12 10:45:22.000000000 +0000
+++ linux-2.6.14/drivers/i2c/busses/i2c-pxa.c	2005-11-12 10:49:08.000000000 +0000
@@ -900,6 +900,12 @@
 	struct pxa_i2c *i2c = adap->algo_data;
 	int ret, i;
 
+	/* If the I2C controller is disabled we need to reset it (probably due 
+ 	   to a suspend/resume destroying state). We do this here as we can then 
+ 	   avoid worrying about resuming the controller before its users. */
+	if (!(ICR & ICR_IUE))
+		i2c_pxa_reset(i2c);
+
 	for (i = adap->retries; i >= 0; i--) {
 		ret = i2c_pxa_do_xfer(i2c, msgs, num);
 		if (ret != I2C_RETRY)
@@ -939,7 +940,9 @@
 static int i2c_pxa_probe(struct platform_device *dev)
 {
 	struct pxa_i2c *i2c = &i2c_pxa;
+#ifdef CONFIG_I2C_PXA_SLAVE
 	struct i2c_pxa_platform_data *plat = dev->dev.platform_data;
+#endif
 	int ret;
 
 #ifdef CONFIG_PXA27x
@@ -1024,5 +1041,7 @@
 	return platform_driver_unregister(&i2c_pxa_driver);
 }
 
+MODULE_LICENSE("GPL");
+
 module_init(i2c_adap_pxa_init);
 module_exit(i2c_adap_pxa_exit);

