#include "m88ts2022_priv.h"
 
-static int m88ts2022_cmd(struct dvb_frontend *fe,
-               int op, int sleep, u8 reg, u8 mask, u8 val, u8 *reg_val)
+static int m88ts2022_cmd(struct m88ts2022_dev *dev, int op, int sleep, u8 reg,
+               u8 mask, u8 val, u8 *reg_val)
 {
-       struct m88ts2022_dev *dev = fe->tuner_priv;
        int ret, i;
        unsigned int utmp;
        struct m88ts2022_reg_val reg_vals[] = {
                        dev->frequency_khz, dev->frequency_khz - c->frequency,
                        f_vco_khz, pll_n, div_ref, div_out);
 
-       ret = m88ts2022_cmd(fe, 0x10, 5, 0x15, 0x40, 0x00, NULL);
+       ret = m88ts2022_cmd(dev, 0x10, 5, 0x15, 0x40, 0x00, NULL);
        if (ret)
                goto err;
 
                if (ret)
                        goto err;
 
-               ret = m88ts2022_cmd(fe, 0x10, 5, 0x15, 0x40, 0x00, NULL);
+               ret = m88ts2022_cmd(dev, 0x10, 5, 0x15, 0x40, 0x00, NULL);
                if (ret)
                        goto err;
        }
                        goto err;
        }
 
-       ret = m88ts2022_cmd(fe, 0x08, 5, 0x3c, 0xff, 0x00, NULL);
+       ret = m88ts2022_cmd(dev, 0x08, 5, 0x3c, 0xff, 0x00, NULL);
        if (ret)
                goto err;
 
        if (ret)
                goto err;
 
-       ret = m88ts2022_cmd(fe, 0x04, 2, 0x26, 0xff, 0x00, &u8tmp);
+       ret = m88ts2022_cmd(dev, 0x04, 2, 0x26, 0xff, 0x00, &u8tmp);
        if (ret)
                goto err;
 
        if (ret)
                goto err;
 
-       ret = m88ts2022_cmd(fe, 0x04, 2, 0x26, 0xff, 0x00, &u8tmp);
+       ret = m88ts2022_cmd(dev, 0x04, 2, 0x26, 0xff, 0x00, &u8tmp);
        if (ret)
                goto err;
 
        if (ret)
                goto err;
 
-       ret = m88ts2022_cmd(fe, 0x04, 2, 0x26, 0xff, 0x00, &u8tmp);
+       ret = m88ts2022_cmd(dev, 0x04, 2, 0x26, 0xff, 0x00, &u8tmp);
        if (ret)
                goto err;
 
        if (ret)
                goto err;
 
-       ret = m88ts2022_cmd(fe, 0x04, 2, 0x26, 0xff, 0x00, &u8tmp);
+       ret = m88ts2022_cmd(dev, 0x04, 2, 0x26, 0xff, 0x00, &u8tmp);
        if (ret)
                goto err;
 
        if (ret)
                goto err;
 
-       ret = m88ts2022_cmd(fe, 0x01, 20, 0x21, 0xff, 0x00, NULL);
+       ret = m88ts2022_cmd(dev, 0x01, 20, 0x21, 0xff, 0x00, NULL);
        if (ret)
                goto err;
 err: