V4L/DVB (12440): Use kzalloc for frontend states to have struct dvb_frontend properly
[pandora-kernel.git] / drivers / media / dvb / frontends / tda8083.c
index 67415c9..9369f74 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/moduleparam.h>
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/jiffies.h>
@@ -69,7 +68,7 @@ static int tda8083_writereg (struct tda8083_state* state, u8 reg, u8 data)
 
        if (ret != 1)
                dprintk ("%s: writereg error (reg %02x, ret == %i)\n",
-                       __FUNCTION__, reg, ret);
+                       __func__, reg, ret);
 
        return (ret != 1) ? -1 : 0;
 }
@@ -84,7 +83,7 @@ static int tda8083_readregs (struct tda8083_state* state, u8 reg1, u8 *b, u8 len
 
        if (ret != 2)
                dprintk ("%s: readreg error (reg %02x, ret == %i)\n",
-                       __FUNCTION__, reg1, ret);
+                       __func__, reg1, ret);
 
        return ret == 2 ? 0 : -1;
 }
@@ -418,7 +417,7 @@ struct dvb_frontend* tda8083_attach(const struct tda8083_config* config,
        struct tda8083_state* state = NULL;
 
        /* allocate memory for the internal state */
-       state = kmalloc(sizeof(struct tda8083_state), GFP_KERNEL);
+       state = kzalloc(sizeof(struct tda8083_state), GFP_KERNEL);
        if (state == NULL) goto error;
 
        /* setup the state */
@@ -443,12 +442,12 @@ static struct dvb_frontend_ops tda8083_ops = {
        .info = {
                .name                   = "Philips TDA8083 DVB-S",
                .type                   = FE_QPSK,
-               .frequency_min          = 950000,     /* FIXME: guessed! */
-               .frequency_max          = 1400000,    /* FIXME: guessed! */
+               .frequency_min          = 920000,     /* TDA8060 */
+               .frequency_max          = 2200000,    /* TDA8060 */
                .frequency_stepsize     = 125,   /* kHz for QPSK frontends */
        /*      .frequency_tolerance    = ???,*/
-               .symbol_rate_min        = 1000000,   /* FIXME: guessed! */
-               .symbol_rate_max        = 45000000,  /* FIXME: guessed! */
+               .symbol_rate_min        = 12000000,
+               .symbol_rate_max        = 30000000,
        /*      .symbol_rate_tolerance  = ???,*/
                .caps = FE_CAN_INVERSION_AUTO |
                        FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |