patch-2.4.22 linux-2.4.22/drivers/media/video/tda7432.c
Next file: linux-2.4.22/drivers/media/video/tda9875.c
Previous file: linux-2.4.22/drivers/media/video/swarm_saa7114h.c
Back to the patch index
Back to the overall index
- Lines: 70
- Date:
2003-08-25 04:44:42.000000000 -0700
- Orig file:
linux-2.4.21/drivers/media/video/tda7432.c
- Orig date:
2003-06-13 07:51:34.000000000 -0700
diff -urN linux-2.4.21/drivers/media/video/tda7432.c linux-2.4.22/drivers/media/video/tda7432.c
@@ -51,6 +51,7 @@
#include "bttv.h"
#include "audiochip.h"
#include "id.h"
+#include "i2c-compat.h"
#ifndef VIDEO_AUDIO_BALANCE
# define VIDEO_AUDIO_BALANCE 32
@@ -260,7 +261,7 @@
static int tda7432_set(struct i2c_client *client)
{
- struct tda7432 *t = client->data;
+ struct tda7432 *t = i2c_get_clientdata(client);
unsigned char buf[16];
d2printk("tda7432: In tda7432_set\n");
@@ -287,7 +288,7 @@
static void do_tda7432_init(struct i2c_client *client)
{
- struct tda7432 *t = client->data;
+ struct tda7432 *t = i2c_get_clientdata(client);
d2printk("tda7432: In tda7432_init\n");
t->input = TDA7432_STEREO_IN | /* Main (stereo) input */
@@ -328,11 +329,10 @@
memcpy(client,&client_template,sizeof(struct i2c_client));
client->adapter = adap;
client->addr = addr;
- client->data = t;
+ i2c_set_clientdata(client, t);
do_tda7432_init(client);
MOD_INC_USE_COUNT;
- strcpy(client->name,"TDA7432");
printk(KERN_INFO "tda7432: init\n");
i2c_attach_client(client);
@@ -348,7 +348,7 @@
static int tda7432_detach(struct i2c_client *client)
{
- struct tda7432 *t = client->data;
+ struct tda7432 *t = i2c_get_clientdata(client);
do_tda7432_init(client);
i2c_detach_client(client);
@@ -361,7 +361,7 @@
static int tda7432_command(struct i2c_client *client,
unsigned int cmd, void *arg)
{
- struct tda7432 *t = client->data;
+ struct tda7432 *t = i2c_get_clientdata(client);
d2printk("tda7432: In tda7432_command\n");
switch (cmd) {
@@ -525,9 +525,9 @@
static struct i2c_client client_template =
{
- .name = "tda7432",
- .id = -1,
- .driver = &driver,
+ I2C_DEVNAME("tda7432"),
+ .id = -1,
+ .driver = &driver,
};
static int tda7432_init(void)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)