Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git] / drivers / media / dvb / dvb-usb / vp702x-fe.c
index 104b5d0..d4da494 100644 (file)
@@ -147,8 +147,9 @@ static int vp702x_fe_set_frontend(struct dvb_frontend* fe,
        cmd[4] = (sr >> 4)  & 0xff;
        cmd[5] = (sr << 4)  & 0xf0;
 
-       deb_fe("setting frontend to: %u -> %u (%x) LNB-based GHz, symbolrate: %d -> %Lu (%Lx)\n",
-                       fep->frequency,freq,freq, fep->u.qpsk.symbol_rate, sr, sr);
+       deb_fe("setting frontend to: %u -> %u (%x) LNB-based GHz, symbolrate: %d -> %lu (%lx)\n",
+                       fep->frequency,freq,freq, fep->u.qpsk.symbol_rate,
+                       (unsigned long) sr, (unsigned long) sr);
 
 /*     if (fep->inversion == INVERSION_ON)
                cmd[6] |= 0x80; */
@@ -190,7 +191,7 @@ static int vp702x_fe_get_frontend(struct dvb_frontend* fe,
 }
 
 static int vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe,
-                                   struct dvb_diseqc_master_cmd *m)
+                                   struct dvb_diseqc_master_cmd *m)
 {
        struct vp702x_fe_state *st = fe->demodulator_priv;
        u8 cmd[8],ibuf[10];
@@ -281,23 +282,21 @@ static struct dvb_frontend_ops vp702x_fe_ops;
 
 struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d)
 {
-       struct vp702x_fe_state *s = kmalloc(sizeof(struct vp702x_fe_state), GFP_KERNEL);
+       struct vp702x_fe_state *s = kzalloc(sizeof(struct vp702x_fe_state), GFP_KERNEL);
        if (s == NULL)
                goto error;
-       memset(s,0,sizeof(struct vp702x_fe_state));
 
        s->d = d;
-       s->fe.ops = &vp702x_fe_ops;
+
+       memcpy(&s->fe.ops,&vp702x_fe_ops,sizeof(struct dvb_frontend_ops));
        s->fe.demodulator_priv = s;
 
        s->lnb_buf[1] = SET_LNB_POWER;
        s->lnb_buf[3] = 0xff; /* 0=tone burst, 2=data burst, ff=off */
 
-       goto success;
+       return &s->fe;
 error:
        return NULL;
-success:
-       return &s->fe;
 }