]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/frontends/nxt200x.c
dvb frontends: treat firmware data as const
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / frontends / nxt200x.c
index ddc84899cf862f3b8834f90977fe84396e7ac8b2..af298358e822e4048cf7b03c312cf5abb73e7312 100644 (file)
@@ -44,7 +44,6 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/moduleparam.h>
 #include <linux/slab.h>
 #include <linux/string.h>
 
@@ -75,7 +74,7 @@ static int i2c_writebytes (struct nxt200x_state* state, u8 addr, u8 *buf, u8 len
 
        if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
                printk (KERN_WARNING "nxt200x: %s: i2c write error (addr 0x%02x, err == %i)\n",
-                       __FUNCTION__, addr, err);
+                       __func__, addr, err);
                return -EREMOTEIO;
        }
        return 0;
@@ -88,13 +87,14 @@ static u8 i2c_readbytes (struct nxt200x_state* state, u8 addr, u8* buf, u8 len)
 
        if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
                printk (KERN_WARNING "nxt200x: %s: i2c read error (addr 0x%02x, err == %i)\n",
-                       __FUNCTION__, addr, err);
+                       __func__, addr, err);
                return -EREMOTEIO;
        }
        return 0;
 }
 
-static int nxt200x_writebytes (struct nxt200x_state* state, u8 reg, u8 *buf, u8 len)
+static int nxt200x_writebytes (struct nxt200x_state* state, u8 reg,
+                              const u8 *buf, u8 len)
 {
        u8 buf2 [len+1];
        int err;
@@ -105,7 +105,7 @@ static int nxt200x_writebytes (struct nxt200x_state* state, u8 reg, u8 *buf, u8
 
        if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
                printk (KERN_WARNING "nxt200x: %s: i2c write error (addr 0x%02x, err == %i)\n",
-                       __FUNCTION__, state->config->demod_address, err);
+                       __func__, state->config->demod_address, err);
                return -EREMOTEIO;
        }
        return 0;
@@ -122,7 +122,7 @@ static u8 nxt200x_readbytes (struct nxt200x_state* state, u8 reg, u8* buf, u8 le
 
        if ((err = i2c_transfer (state->i2c, msg, 2)) != 2) {
                printk (KERN_WARNING "nxt200x: %s: i2c read error (addr 0x%02x, err == %i)\n",
-                       __FUNCTION__, state->config->demod_address, err);
+                       __func__, state->config->demod_address, err);
                return -EREMOTEIO;
        }
        return 0;
@@ -147,7 +147,7 @@ static u16 nxt200x_crc(u16 crc, u8 c)
 static int nxt200x_writereg_multibyte (struct nxt200x_state* state, u8 reg, u8* data, u8 len)
 {
        u8 attr, len2, buf;
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* set mutli register register */
        nxt200x_writebytes(state, 0x35, &reg, 1);
@@ -208,7 +208,7 @@ static int nxt200x_readreg_multibyte (struct nxt200x_state* state, u8 reg, u8* d
 {
        int i;
        u8 buf, len2, attr;
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* set mutli register register */
        nxt200x_writebytes(state, 0x35, &reg, 1);
@@ -255,7 +255,7 @@ static int nxt200x_readreg_multibyte (struct nxt200x_state* state, u8 reg, u8* d
 static void nxt200x_microcontroller_stop (struct nxt200x_state* state)
 {
        u8 buf, stopval, counter = 0;
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        /* set correct stop value */
        switch (state->demod_chip) {
@@ -288,7 +288,7 @@ static void nxt200x_microcontroller_stop (struct nxt200x_state* state)
 static void nxt200x_microcontroller_start (struct nxt200x_state* state)
 {
        u8 buf;
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        buf = 0x00;
        nxt200x_writebytes(state, 0x22, &buf, 1);
@@ -298,7 +298,7 @@ static void nxt2004_microcontroller_init (struct nxt200x_state* state)
 {
        u8 buf[9];
        u8 counter = 0;
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        buf[0] = 0x00;
        nxt200x_writebytes(state, 0x2b, buf, 1);
@@ -329,7 +329,7 @@ static int nxt200x_writetuner (struct nxt200x_state* state, u8* data)
 {
        u8 buf, count = 0;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        dprintk("Tuner Bytes: %02X %02X %02X %02X\n", data[1], data[2], data[3], data[4]);
 
@@ -388,7 +388,7 @@ static int nxt200x_writetuner (struct nxt200x_state* state, u8* data)
 static void nxt200x_agc_reset(struct nxt200x_state* state)
 {
        u8 buf;
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
 
        switch (state->demod_chip) {
                case NXT2002:
@@ -417,7 +417,7 @@ static int nxt2002_load_firmware (struct dvb_frontend* fe, const struct firmware
        u8 buf[3], written = 0, chunkpos = 0;
        u16 rambase, position, crc = 0;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
        dprintk("Firmware is %zu bytes\n", fw->size);
 
        /* Get the RAM base for this nxt2002 */
@@ -484,7 +484,7 @@ static int nxt2004_load_firmware (struct dvb_frontend* fe, const struct firmware
        u8 buf[3];
        u16 rambase, position, crc=0;
 
-       dprintk("%s\n", __FUNCTION__);
+       dprintk("%s\n", __func__);
        dprintk("Firmware is %zu bytes\n", fw->size);
 
        /* set rambase */