Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / media / video / ovcamchip / ov6x30.c
index 44a8423..73b94f5 100644 (file)
@@ -141,10 +141,9 @@ static int ov6x30_init(struct i2c_client *c)
        if (rc < 0)
                return rc;
 
-       ov->spriv = s = kmalloc(sizeof *s, GFP_KERNEL);
+       ov->spriv = s = kzalloc(sizeof *s, GFP_KERNEL);
        if (!s)
                return -ENOMEM;
-       memset(s, 0, sizeof *s);
 
        s->auto_brt = 1;
        s->auto_exp = 1;
@@ -301,7 +300,7 @@ static int ov6x30_mode_init(struct i2c_client *c, struct ovcamchip_window *win)
        /******** Palette-specific regs ********/
 
        if (win->format == VIDEO_PALETTE_GREY) {
-               if (c->adapter->id == (I2C_ALGO_SMBUS | I2C_HW_SMBUS_OV518)) {
+               if (c->adapter->id == I2C_HW_SMBUS_OV518) {
                        /* Do nothing - we're already in 8-bit mode */
                } else {
                        ov_write_mask(c, 0x13, 0x20, 0x20);
@@ -313,7 +312,7 @@ static int ov6x30_mode_init(struct i2c_client *c, struct ovcamchip_window *win)
                 * Therefore, the OV6630 needs to be in 8-bit multiplexed
                 * output mode */
 
-               if (c->adapter->id == (I2C_ALGO_SMBUS | I2C_HW_SMBUS_OV518)) {
+               if (c->adapter->id == I2C_HW_SMBUS_OV518) {
                        /* Do nothing - we want to stay in 8-bit mode */
                        /* Warning: Messing with reg 0x13 breaks OV518 color */
                } else {