1 diff -u linux-2.4.22/drivers/media/video/bt832.c linux/drivers/media/video/bt832.c
2 --- linux-2.4.22/drivers/media/video/bt832.c 2003-09-08 17:26:56.000000000 +0200
3 +++ linux/drivers/media/video/bt832.c 2003-09-08 17:30:22.000000000 +0200
5 /* Driver for Bt832 CMOS Camera Video Processor
6 - i2c-adresses: 0x88 or 0x8a
7 + i2c-addresses: 0x88 or 0x8a
9 The BT832 interfaces to a Quartzsight Digital Camera (352x288, 25 or 30 fps)
10 via a 9 pin connector ( 4-wire SDATA, 2-wire i2c, SCLK, VCC, GND).
12 #include <linux/errno.h>
13 #include <linux/slab.h>
16 #include "audiochip.h"
18 +#include "i2c-compat.h"
24 memset(t,0,sizeof(*t));
25 t->client = client_template;
27 + i2c_set_clientdata(&t->client, t);
28 i2c_attach_client(&t->client);
33 static int bt832_probe(struct i2c_adapter *adap)
37 - printk("bt832_probe\n");
40 - case I2C_ALGO_BIT | I2C_HW_B_BT848:
41 - case I2C_ALGO_BIT | I2C_HW_B_RIVA:
42 - case I2C_ALGO_SAA7134:
43 - printk("bt832: probing %s i2c adapter [id=0x%x]\n",
44 - adap->name,adap->id);
45 - rc = i2c_probe(adap, &addr_data, bt832_attach);
48 - printk("bt832: ignoring %s i2c adapter [id=0x%x]\n",
49 - adap->name,adap->id);
54 +#ifdef I2C_ADAP_CLASS_TV_ANALOG
55 + if (adap->class & I2C_ADAP_CLASS_TV_ANALOG)
56 + return i2c_probe(adap, &addr_data, bt832_attach);
58 + if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848))
59 + return i2c_probe(adap, &addr_data, bt832_attach);
64 static int bt832_detach(struct i2c_client *client)
66 - struct bt832 *t = (struct bt832*)client->data;
67 + struct bt832 *t = i2c_get_clientdata(client);
69 printk("bt832: detach.\n");
70 i2c_detach_client(client);
73 bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
75 - struct bt832 *t = (struct bt832*)client->data;
76 + struct bt832 *t = i2c_get_clientdata(client);
78 printk("bt832: command %x\n",cmd);
82 static struct i2c_client client_template =
85 - .flags = I2C_CLIENT_ALLOW_USE,
87 + I2C_DEVNAME("bt832"),
88 + .flags = I2C_CLIENT_ALLOW_USE,
94 module_init(bt832_init_module);
95 module_exit(bt832_cleanup_module);
98 + * Overrides for Emacs so that we follow Linus's tabbing style.
99 + * ---------------------------------------------------------------------------
101 + * c-basic-offset: 8
104 diff -u linux-2.4.22/drivers/media/video/bt832.h linux/drivers/media/video/bt832.h
105 --- linux-2.4.22/drivers/media/video/bt832.h 2003-09-08 17:27:12.000000000 +0200
106 +++ linux/drivers/media/video/bt832.h 2003-09-08 17:30:22.000000000 +0200
108 color digital camera directly to video capture devices via an 8-bit,
109 4:2:2 YUV or YCrCb video interface.
111 - i2c adresses: 0x88 or 0x8a
112 + i2c addresses: 0x88 or 0x8a
115 /* The 64 registers: */