diff options
Diffstat (limited to 'drivers/media/video/bt832.c')
-rw-r--r-- | drivers/media/video/bt832.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/video/bt832.c b/drivers/media/video/bt832.c index dda4aa6bef27..07c78f1f7a44 100644 --- a/drivers/media/video/bt832.c +++ b/drivers/media/video/bt832.c | |||
@@ -75,13 +75,13 @@ int bt832_hexdump(struct i2c_client *i2c_client_s, unsigned char *buf) | |||
75 | 75 | ||
76 | if(debug>1) { | 76 | if(debug>1) { |
77 | int i; | 77 | int i; |
78 | v4l_dbg(2,i2c_client_s,"hexdump:"); | 78 | v4l_dbg(2, debug,i2c_client_s,"hexdump:"); |
79 | for(i=1;i<65;i++) { | 79 | for(i=1;i<65;i++) { |
80 | if(i!=1) { | 80 | if(i!=1) { |
81 | if(((i-1)%8)==0) printk(" "); | 81 | if(((i-1)%8)==0) printk(" "); |
82 | if(((i-1)%16)==0) { | 82 | if(((i-1)%16)==0) { |
83 | printk("\n"); | 83 | printk("\n"); |
84 | v4l_dbg(2,i2c_client_s,"hexdump:"); | 84 | v4l_dbg(2, debug,i2c_client_s,"hexdump:"); |
85 | } | 85 | } |
86 | } | 86 | } |
87 | printk(" %02x",buf[i]); | 87 | printk(" %02x",buf[i]); |
@@ -167,9 +167,8 @@ static int bt832_attach(struct i2c_adapter *adap, int addr, int kind) | |||
167 | client_template.adapter = adap; | 167 | client_template.adapter = adap; |
168 | client_template.addr = addr; | 168 | client_template.addr = addr; |
169 | 169 | ||
170 | if (NULL == (t = kmalloc(sizeof(*t), GFP_KERNEL))) | 170 | if (NULL == (t = kzalloc(sizeof(*t), GFP_KERNEL))) |
171 | return -ENOMEM; | 171 | return -ENOMEM; |
172 | memset(t,0,sizeof(*t)); | ||
173 | t->client = client_template; | 172 | t->client = client_template; |
174 | i2c_set_clientdata(&t->client, t); | 173 | i2c_set_clientdata(&t->client, t); |
175 | i2c_attach_client(&t->client); | 174 | i2c_attach_client(&t->client); |