]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/dvb-usb/vp7045-fe.c
Merge branch 'x86/debug' into x86/cpu
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / dvb-usb / vp7045-fe.c
index 83f1de1e7e571daaede818ace9b90c50fbab484a..8452eef90322be8d97e9a08c81881cc47f6cf311 100644 (file)
@@ -26,7 +26,6 @@ struct vp7045_fe_state {
        struct dvb_usb_device *d;
 };
 
-
 static int vp7045_fe_read_status(struct dvb_frontend* fe, fe_status_t *status)
 {
        struct vp7045_fe_state *state = fe->demodulator_priv;
@@ -145,20 +144,17 @@ static struct dvb_frontend_ops vp7045_fe_ops;
 
 struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d)
 {
-       struct vp7045_fe_state *s = kmalloc(sizeof(struct vp7045_fe_state), GFP_KERNEL);
+       struct vp7045_fe_state *s = kzalloc(sizeof(struct vp7045_fe_state), GFP_KERNEL);
        if (s == NULL)
                goto error;
-       memset(s,0,sizeof(struct vp7045_fe_state));
 
        s->d = d;
-       s->fe.ops = &vp7045_fe_ops;
+       memcpy(&s->fe.ops, &vp7045_fe_ops, sizeof(struct dvb_frontend_ops));
        s->fe.demodulator_priv = s;
 
-       goto success;
+       return &s->fe;
 error:
        return NULL;
-success:
-       return &s->fe;
 }