Camera module i2c driver port to 2.6
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Index: linux-2.6.16/drivers/i2c/chips/a780_camera.c
===================================================================
--- linux-2.6.16.orig/drivers/i2c/chips/a780_camera.c	2007-03-17 20:24:16.000000000 -0300
+++ linux-2.6.16/drivers/i2c/chips/a780_camera.c	2007-03-17 20:26:07.000000000 -0300
@@ -11,6 +11,7 @@
  *  it under the terms of the GNU General Public License version 2 as
  *  published by the Free Software Foundation.
  *
+ * March 17, 2007 (Daniel Ribeiro) - Port to 2.6
  *
  */
 #include <linux/miscdevice.h>
@@ -76,12 +77,14 @@
 static int a780_camera_client_unregister(struct i2c_client *client);
 /* ----------------------------------------------------------------------- */
 static struct i2c_driver driver = {
-	.name		= "a780 camera driver",
+	.driver = {
+		.name		= "a780 camera driver",
+		.owner		= THIS_MODULE,
+	},
 	.id		= I2C_A780_CAMERA,
 	//flags:           I2C_DF_DUMMY,
 	.attach_adapter	= a780_camera_adapter_attach,        
 	.detach_client	= a780_camera_detach,
-	.owner		= THIS_MODULE,
 };
 
 static struct i2c_adapter a780_camera_adapter = {
@@ -94,7 +97,7 @@
 static struct i2c_client client_template =
 {
     name:   "(unset)",        
-    adapter:&a780_camera_adapter,
+//    adapter:&a780_camera_adapter,
 };
 
 struct i2c_client *a780_camera_client;
@@ -162,9 +165,9 @@
 		return -ENOMEM;
 	memcpy(a780_camera_client,&client_template,sizeof(struct i2c_client));
 	a780_camera_client->adapter = adap;
-        
+	a780_camera_client->flags = 0;
 	a780_camera_client->addr = 0x5D;
-	
+	a780_camera_client->driver = &driver;
 	i2c_attach_client(a780_camera_client);
 	return 0;
 }	

