]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/frontends/or51211.c
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / frontends / or51211.c
index 6a6b0d727c6fc53ece47c2816086e8cf9025cf3f..6afe12aaca4e53d6ab417279c5c143e69d271c72 100644 (file)
@@ -69,7 +69,7 @@ struct or51211_state {
        u32 current_frequency;
 };
 
-static int i2c_writebytes (struct or51211_state* state, u8 reg, u8 *buf,
+static int i2c_writebytes (struct or51211_state* state, u8 reg, const u8 *buf,
                           int len)
 {
        int err;
@@ -77,7 +77,7 @@ static int i2c_writebytes (struct or51211_state* state, u8 reg, u8 *buf,
        msg.addr        = reg;
        msg.flags       = 0;
        msg.len         = len;
-       msg.buf         = buf;
+       msg.buf         = (u8 *)buf;
 
        if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
                printk(KERN_WARNING "or51211: i2c_writebytes error "
@@ -307,19 +307,19 @@ static int or51211_read_snr(struct dvb_frontend* fe, u16* snr)
 
        if (i2c_writebytes(state,state->config->demod_address,snd_buf,3)) {
                printk(KERN_WARNING "%s: error writing snr reg\n",
-                      __FUNCTION__);
+                      __func__);
                return -1;
        }
        if (i2c_readbytes(state,state->config->demod_address,rec_buf,2)) {
                printk(KERN_WARNING "%s: read_status read error\n",
-                      __FUNCTION__);
+                      __func__);
                return -1;
        }
 
        state->snr = calculate_snr(rec_buf[0], 89599047);
        *snr = (state->snr) >> 16;
 
-       dprintk("%s: noise = 0x%02x, snr = %d.%02d dB\n", __FUNCTION__, rec_buf[0],
+       dprintk("%s: noise = 0x%02x, snr = %d.%02d dB\n", __func__, rec_buf[0],
                state->snr >> 24, (((state->snr>>8) & 0xffff) * 100) >> 16);
 
        return 0;