diff options
author | Max Kellermann <max.kellermann@gmail.com> | 2016-08-09 18:32:46 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-18 15:10:41 -0200 |
commit | f686c14364ade79a373ef65c0fecfc2953ca8da5 (patch) | |
tree | 7efab932b9da87f5a2183020d823b14690880b50 | |
parent | d812b3caea394a6c60e8d6a4ad46b941690435e3 (diff) | |
download | talos-obmc-linux-f686c14364ade79a373ef65c0fecfc2953ca8da5.tar.gz talos-obmc-linux-f686c14364ade79a373ef65c0fecfc2953ca8da5.zip |
[media] stb0899: move code to "detach" callback
Ensure that STB0899_POSTPROC_GPIO_POWER is set synchronously.
Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/dvb-frontends/stb0899_drv.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/stb0899_drv.c b/drivers/media/dvb-frontends/stb0899_drv.c index cc18891f9b45..02347598277a 100644 --- a/drivers/media/dvb-frontends/stb0899_drv.c +++ b/drivers/media/dvb-frontends/stb0899_drv.c @@ -601,13 +601,19 @@ static int stb0899_postproc(struct stb0899_state *state, u8 ctl, int enable) return 0; } -static void stb0899_release(struct dvb_frontend *fe) +static void stb0899_detach(struct dvb_frontend *fe) { struct stb0899_state *state = fe->demodulator_priv; - dprintk(state->verbose, FE_DEBUG, 1, "Release Frontend"); /* post process event */ stb0899_postproc(state, STB0899_POSTPROC_GPIO_POWER, 0); +} + +static void stb0899_release(struct dvb_frontend *fe) +{ + struct stb0899_state *state = fe->demodulator_priv; + + dprintk(state->verbose, FE_DEBUG, 1, "Release Frontend"); kfree(state); } @@ -1590,6 +1596,7 @@ static const struct dvb_frontend_ops stb0899_ops = { FE_CAN_QPSK }, + .detach = stb0899_detach, .release = stb0899_release, .init = stb0899_init, .sleep = stb0899_sleep, |