]> git.pld-linux.org Git - packages/kernel.git/blob - 30_bt832-2.4.22.diff
- replaced by linux-2.4-sfq.patch
[packages/kernel.git] / 30_bt832-2.4.22.diff
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
4 @@ -1,5 +1,5 @@
5  /* Driver for Bt832 CMOS Camera Video Processor
6 -    i2c-adresses: 0x88 or 0x8a
7 +    i2c-addresses: 0x88 or 0x8a
8  
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).
11 @@ -31,8 +31,9 @@
12  #include <linux/errno.h>
13  #include <linux/slab.h>
14  
15 -#include "id.h"
16  #include "audiochip.h"
17 +#include "id.h"
18 +#include "i2c-compat.h"
19  #include "bttv.h"
20  #include "bt832.h"
21  
22 @@ -184,7 +185,7 @@
23                  return -ENOMEM;
24         memset(t,0,sizeof(*t));
25         t->client = client_template;
26 -        t->client.data = t;
27 +        i2c_set_clientdata(&t->client, t);
28          i2c_attach_client(&t->client);
29  
30         MOD_INC_USE_COUNT;
31 @@ -198,30 +199,19 @@
32  
33  static int bt832_probe(struct i2c_adapter *adap)
34  {
35 -       int rc;
36 -
37 -       printk("bt832_probe\n");
38 -
39 -       switch (adap->id) {
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);
46 -               break;
47 -       default:
48 -               printk("bt832: ignoring %s i2c adapter [id=0x%x]\n",
49 -                      adap->name,adap->id);
50 -               rc = 0;
51 -               /* nothing */
52 -       }
53 -       return rc;
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);
57 +#else
58 +       if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848))
59 +               return i2c_probe(adap, &addr_data, bt832_attach);
60 +#endif
61 +       return 0;
62  }
63  
64  static int bt832_detach(struct i2c_client *client)
65  {
66 -       struct bt832 *t = (struct bt832*)client->data;
67 +       struct bt832 *t = i2c_get_clientdata(client);
68  
69         printk("bt832: detach.\n");
70         i2c_detach_client(client);
71 @@ -233,7 +223,7 @@
72  static int
73  bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
74  {
75 -       struct bt832 *t = (struct bt832*)client->data;
76 +       struct bt832 *t = i2c_get_clientdata(client);
77  
78         printk("bt832: command %x\n",cmd);
79  
80 @@ -266,9 +256,9 @@
81  };
82  static struct i2c_client client_template =
83  {
84 -        .name   = "bt832",
85 -       .flags  = I2C_CLIENT_ALLOW_USE,
86 -        .driver = &driver,
87 +       I2C_DEVNAME("bt832"),
88 +       .flags      = I2C_CLIENT_ALLOW_USE,
89 +        .driver     = &driver,
90  };
91  
92  
93 @@ -286,3 +276,10 @@
94  module_init(bt832_init_module);
95  module_exit(bt832_cleanup_module);
96  
97 +/*
98 + * Overrides for Emacs so that we follow Linus's tabbing style.
99 + * ---------------------------------------------------------------------------
100 + * Local variables:
101 + * c-basic-offset: 8
102 + * End:
103 + */
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
107 @@ -4,7 +4,7 @@
108    color digital camera directly to video capture devices via an 8-bit,
109    4:2:2 YUV or YCrCb video interface.
110  
111 - i2c adresses: 0x88 or 0x8a
112 + i2c addresses: 0x88 or 0x8a
113   */
114  
115  /* The 64 registers: */
This page took 0.088765 seconds and 3 git commands to generate.