From 5e5ff60b21f72f03b74e4f3acbaa64c698fddac6 Mon Sep 17 00:00:00 2001 From: internal <> Date: Mon, 31 Jul 2023 22:04:49 +0200 Subject: [PATCH] adjust usage count for frontends which do not have their own module --- ddbridge/ddbridge-core.c | 7 +++---- ddbridge/ddbridge-m4.c | 3 +++ ddbridge/ddbridge-sx8.c | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ddbridge/ddbridge-core.c b/ddbridge/ddbridge-core.c index 7c645c4..c654a32 100644 --- a/ddbridge/ddbridge-core.c +++ b/ddbridge/ddbridge-core.c @@ -1122,6 +1122,9 @@ static int dummy_read_status(struct dvb_frontend *fe, enum fe_status *status) static void dummy_release(struct dvb_frontend *fe) { kfree(fe); +#ifdef CONFIG_MEDIA_ATTACH + __module_get(THIS_MODULE); +#endif } static enum dvbfe_algo dummy_algo(struct dvb_frontend *fe) @@ -1170,11 +1173,7 @@ static int demod_attach_dummy(struct ddb_input *input) { struct ddb_dvb *dvb = &input->port->dvb[input->nr & 1]; -#if 0 - dvb->fe = dvb_attach(dummy_attach); -#else dvb->fe = dummy_attach(); -#endif return 0; } diff --git a/ddbridge/ddbridge-m4.c b/ddbridge/ddbridge-m4.c index 9dce588..74ccc77 100644 --- a/ddbridge/ddbridge-m4.c +++ b/ddbridge/ddbridge-m4.c @@ -457,6 +457,9 @@ static void release(struct dvb_frontend *fe) kfree(mci_base); } kfree(state); +#ifdef CONFIG_MEDIA_ATTACH + __module_get(THIS_MODULE); +#endif } static enum dvbfe_algo get_algo(struct dvb_frontend *fe) diff --git a/ddbridge/ddbridge-sx8.c b/ddbridge/ddbridge-sx8.c index 84f7a3d..c25f325 100644 --- a/ddbridge/ddbridge-sx8.c +++ b/ddbridge/ddbridge-sx8.c @@ -117,6 +117,9 @@ static void release(struct dvb_frontend *fe) kfree(mci_base); } kfree(state); +#ifdef CONFIG_MEDIA_ATTACH + __module_get(THIS_MODULE); +#endif } static int ddb_mci_tsconfig(struct mci *state, u32 config)