lkml.org 
[lkml]   [2003]   [Feb]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateWed, 5 Feb 2003 01:28:14 -0500 (EST)
FromFrank Davis <>
Subject[PATCH] 2.5.59 : drivers/media/video/saa7185.c
Hello,
  The following patch addresses buzilla bug #168. Please review for 
inclusion.

Regards,
Frank

--- linux/drivers/media/video/saa7185.c.old	2003-02-05 01:10:58.000000000 -0500
+++ linux/drivers/media/video/saa7185.c	2003-02-05 01:24:22.000000000 -0500
@@ -186,7 +186,7 @@
 {
 	int i;
 	struct saa7185 *encoder;
-	struct i2c_client client;
+	struct i2c_client *client;
 
 	client = kmalloc(sizeof(*client), GFP_KERNEL);
 	if (client == NULL)
@@ -194,14 +194,14 @@
 	client_template.adapter = adap;
 	client_template.addr = addr;
 	memcpy(client, &client_template, sizeof(*client));
-	encoder = kmalloc(sizeof(*decoder), GFP_KERNEL);
+	encoder = kmalloc(sizeof(*encoder), GFP_KERNEL);
 	if (encoder == NULL) {
 		kfree(client);
 		return -ENOMEM;
 	}
 
 
-	memset(encoder, 0, sizeof(*decoder));
+	memset(encoder, 0, sizeof(*encoder));
 	strcpy(client->name, "saa7185");
 	encoder->client = client;
 	client->data = encoder;
@@ -221,7 +221,7 @@
 		printk(KERN_INFO "%s_attach: chip version %d\n",
 		       client->name, i2c_smbus_read_byte(client) >> 5);
 	}
-	init_MUTEX(&decoder->lock);
+	init_MUTEX(&encoder->lock);
 	i2c_attach_client(client);
 	MOD_INC_USE_COUNT;
 	return 0;
@@ -355,6 +355,7 @@
 /* ----------------------------------------------------------------------- */
 
 static struct i2c_driver i2c_driver_saa7185 = {
+	.owner 		= THIS_MODULE,
 	.name	 	= "saa7185",		 /* name */
 	.id 		= I2C_DRIVERID_SAA7185B, /* ID */
 	.flags 		= I2C_DF_NOTIFY,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:32    [W:0.231 / U:0.130 seconds]
©2003-2008 Jasper Spaans