linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
* [Linux-kernel-mentees] [PATCH] media: dvb_dummy_fe.c: add members to dvb_dummy_fe_state
@ 2019-11-30  4:54 Daniel W. S. Almeida
  2019-12-01  8:07 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel W. S. Almeida @ 2019-11-30  4:54 UTC (permalink / raw)
  To: mchehab, gregkh, rfontana, kstewart, tglx
  Cc: linux-kernel, linux-media, linux-kernel-mentees, Daniel W. S. Almeida

From: "Daniel W. S. Almeida" <dwlsalmeida@gmail.com>

Add members to dvb_dummy_fe_state in order to match with other frontends.

Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
---
 drivers/media/dvb-frontends/dvb_dummy_fe.c | 26 +++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/drivers/media/dvb-frontends/dvb_dummy_fe.c b/drivers/media/dvb-frontends/dvb_dummy_fe.c
index 1ccb58c67e8e..80e6a3bf76e0 100644
--- a/drivers/media/dvb-frontends/dvb_dummy_fe.c
+++ b/drivers/media/dvb-frontends/dvb_dummy_fe.c
@@ -15,18 +15,29 @@
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
+struct dvb_dummy_fe_config {};
+
 struct dvb_dummy_fe_state {
 	struct dvb_frontend frontend;
+	struct mutex lock;
+	struct dvb_adapter adapter;
+	struct dvb_frontend frontend;
+	struct dvb_dummy_fe_config config;
+
+	enum fe_status frontend_status;
+	u32 current_frequency;
+
+	bool sleeping;
 };
 
+
+
 static int dvb_dummy_fe_read_status(struct dvb_frontend *fe,
 				    enum fe_status *status)
 {
-	*status = FE_HAS_SIGNAL
-		| FE_HAS_CARRIER
-		| FE_HAS_VITERBI
-		| FE_HAS_SYNC
-		| FE_HAS_LOCK;
+	struct dvb_dummy_fe_state *state = fe->demodulator_priv;
+
+	*status = state->frontend_status;
 
 	return 0;
 }
@@ -79,6 +90,11 @@ static int dvb_dummy_fe_set_frontend(struct dvb_frontend *fe)
 
 static int dvb_dummy_fe_sleep(struct dvb_frontend* fe)
 {
+
+	struct dvb_dummy_fe_state *state = fe->demodulator_priv;
+
+	state->sleeping = true;
+
 	return 0;
 }
 
-- 
2.24.0

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-02  5:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-30  4:54 [Linux-kernel-mentees] [PATCH] media: dvb_dummy_fe.c: add members to dvb_dummy_fe_state Daniel W. S. Almeida
2019-12-01  8:07 ` Mauro Carvalho Chehab
2019-12-02  4:49   ` Daniel W. S. Almeida
2019-12-02  5:50     ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).