X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fovcamchip%2Fov6x30.c;h=73b94f51a85a8c03f4e126fd67db612a82fce754;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=44a842379b457bce335279b447d348bce027886f;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/drivers/media/video/ovcamchip/ov6x30.c b/drivers/media/video/ovcamchip/ov6x30.c index 44a842379..73b94f51a 100644 --- a/drivers/media/video/ovcamchip/ov6x30.c +++ b/drivers/media/video/ovcamchip/ov6x30.c @@ -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 {