Thread (1 message) 1 message, 1 author, 2012-01-05

Re: [PATCH 2/3] drxk: correction frontend attatching

From: Mauro Carvalho Chehab <hidden>
Date: 2012-01-05 20:46:46

On 18-12-2011 04:05, Stefan Ringel wrote:
Am 18.12.2011 00:47, schrieb Oliver Endriss:
quoted
On Sunday 18 December 2011 00:39:49 Oliver Endriss wrote:
quoted
On Saturday 17 December 2011 21:57:16 linuxtv@stefanringel.de wrote:
quoted
From: Stefan Ringel<redacted>

all drxk have dvb-t, but not dvb-c.

Signed-off-by: Stefan Ringel<redacted>
---
  drivers/media/dvb/frontends/drxk_hard.c |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
index 038e470..8a59801 100644
--- a/drivers/media/dvb/frontends/drxk_hard.c
+++ b/drivers/media/dvb/frontends/drxk_hard.c
@@ -6460,9 +6460,11 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
      init_state(state);
      if (init_drxk(state)<  0)
          goto error;
-    *fe_t =&state->t_frontend;
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
quoted
-    return&state->c_frontend;
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
quoted
+    if (state->m_hasDVBC)
+        *fe_t =&state->c_frontend;
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
quoted
+
+    return&state->t_frontend;
                ^^^^^^^^^^^^^^^^^^^
quoted
  error:
      printk(KERN_ERR "drxk: not found\n");
NAK, this changes the behaviour for existing drivers.

What is the point to swap DVB-T and DVB-C frontends?
If you really need this, please add an option to the config struct
with default that does not change anything for existing drivers.
Correction:
Better do something like this (untested):

if (state->m_hasDVBC) {
    *fe_t =&state->t_frontend;
    return state->c_frontend;
} else
    return&state->t_frontend;

CU
Oliver
What shall be that, explain? For me not practicable.
The right thing to do here is to create just one frontend per DRX-K.
This were already discussed in the past. Now that we have enough
dvb-core infrastructure to support it, I've made the patches for it:

	http://news.gmane.org/gmane.linux.drivers.video-input-infrastructure

I took the m_hasDVBC and m_hasDVBT states into account, so DRX-K
drivers that implement just one of the types should now be properly
reported.

It also made the attachment logic simpler.

Regards,
Mauro
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help