diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-29 09:20:13 -0300 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-08 15:25:10 +0900 |
commit | c1d681d0dbceaa5632263d7a04a2e3ac8adc9b01 (patch) | |
tree | 9c676110e36ca67724a2479ae3b4c39faec7d14e | |
parent | 253c7c8dd78c69b850668ab2b1c0ef5453b9ee97 (diff) | |
download | linux-3.10-c1d681d0dbceaa5632263d7a04a2e3ac8adc9b01.tar.gz linux-3.10-c1d681d0dbceaa5632263d7a04a2e3ac8adc9b01.tar.bz2 linux-3.10-c1d681d0dbceaa5632263d7a04a2e3ac8adc9b01.zip |
upstream: [media] dvbdev: add a dvb_detach() macro
The dvb_attach() was unbalanced, as there was no dvb_dettach. Ok,
on current cases, the dettach is done by dvbdev, but that are some
future corner cases where we may need to do this before registering
the frontend.
So, add a dvb_detach() and use it at dvb_frontend.c.
Backports http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=4647f487083d
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/dvb-core/dvb_frontend.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb-core/dvbdev.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 6ce435ac866..6cc2631d8f0 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -2666,20 +2666,20 @@ void dvb_frontend_detach(struct dvb_frontend* fe) if (fe->ops.release_sec) { fe->ops.release_sec(fe); - symbol_put_addr(fe->ops.release_sec); + dvb_detach(fe->ops.release_sec); } if (fe->ops.tuner_ops.release) { fe->ops.tuner_ops.release(fe); - symbol_put_addr(fe->ops.tuner_ops.release); + dvb_detach(fe->ops.tuner_ops.release); } if (fe->ops.analog_ops.release) { fe->ops.analog_ops.release(fe); - symbol_put_addr(fe->ops.analog_ops.release); + dvb_detach(fe->ops.analog_ops.release); } ptr = (void*)fe->ops.release; if (ptr) { fe->ops.release(fe); - symbol_put_addr(ptr); + dvb_detach(ptr); } } #else diff --git a/drivers/media/dvb-core/dvbdev.h b/drivers/media/dvb-core/dvbdev.h index 93a9470d3f0..f96b28e7fc9 100644 --- a/drivers/media/dvb-core/dvbdev.h +++ b/drivers/media/dvb-core/dvbdev.h @@ -136,11 +136,15 @@ extern int dvb_usercopy(struct file *file, unsigned int cmd, unsigned long arg, __r; \ }) +#define dvb_detach(FUNC) symbol_put_addr(FUNC) + #else #define dvb_attach(FUNCTION, ARGS...) ({ \ FUNCTION(ARGS); \ }) +#define dvb_detach(FUNC) {} + #endif #endif /* #ifndef _DVBDEV_H_ */ |