linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* regression in dib0700
@ 2014-06-08 13:20 James Harper
  2014-06-08 15:20 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: James Harper @ 2014-06-08 13:20 UTC (permalink / raw)
  To: linux-media; +Cc: m.chehab

Somewhere along the way there's been a regression in dib0700 for my "Leadtek Winfast DTV Dongle (STK7700P based)"

One is the addition of dvb_detach(&state->dib7000p_ops);

The other is a missing .size_of_priv

The following is required to get it working again, although obviously commenting out dvb_detach isn't really correct. dvb_detach looks like it is supposed to take a function as an argument...

James

diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c
index d067bb7..4c80151 100644
--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
@@ -721,7 +721,7 @@ static int stk7700p_frontend_attach(struct dvb_usb_adapter *adap)
                adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 18, &stk7700p_dib7000p_config);
                st->is_dib7000pc = 1;
        } else {
-               dvb_detach(&state->dib7000p_ops);
+               //dvb_detach(&state->dib7000p_ops);
                memset(&state->dib7000p_ops, 0, sizeof(state->dib7000p_ops));
                adap->fe_adap[0].fe = dvb_attach(dib7000m_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000m_config);
        }
@@ -3788,6 +3788,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {

                                DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
                        }},
+                               .size_of_priv     = sizeof(struct dib0700_adapter_state),
                        },
                },

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

* Re: regression in dib0700
  2014-06-08 13:20 regression in dib0700 James Harper
@ 2014-06-08 15:20 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2014-06-08 15:20 UTC (permalink / raw)
  To: James Harper; +Cc: linux-media

Em Sun, 08 Jun 2014 13:20:45 +0000
James Harper <james@ejbdigital.com.au> escreveu:

> Somewhere along the way there's been a regression in dib0700 for my "Leadtek Winfast DTV Dongle (STK7700P based)"
> 
> One is the addition of dvb_detach(&state->dib7000p_ops);
> 
> The other is a missing .size_of_priv
> 
> The following is required to get it working again, although obviously commenting out dvb_detach isn't really correct. dvb_detach looks like it is supposed to take a function as an argument...

Actually, removing dvb_detach() there is the right thing to do. This 
should be called only at the error handling logic, on devices with
two frontends, with is not this case. 

Perhaps this came from some bad merge conflict solving.

I'll double check if dvb_detach() is called on needed error conditions,
and if it is not called elsewhere.

Thanks for reporting it!

Please re-span this patch removing the dvb_detach() and send it with
your Signed-off-by for me to apply the new version.

Regards,
Mauro

> 
> James
> 
> diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c
> index d067bb7..4c80151 100644
> --- a/drivers/media/usb/dvb-usb/dib0700_devices.c
> +++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
> @@ -721,7 +721,7 @@ static int stk7700p_frontend_attach(struct dvb_usb_adapter *adap)
>                 adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 18, &stk7700p_dib7000p_config);
>                 st->is_dib7000pc = 1;
>         } else {
> -               dvb_detach(&state->dib7000p_ops);
> +               //dvb_detach(&state->dib7000p_ops);
>                 memset(&state->dib7000p_ops, 0, sizeof(state->dib7000p_ops));
>                 adap->fe_adap[0].fe = dvb_attach(dib7000m_attach, &adap->dev->i2c_adap, 18, &stk7700p_dib7000m_config);
>         }
> @@ -3788,6 +3788,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
> 
>                                 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
>                         }},
> +                               .size_of_priv     = sizeof(struct dib0700_adapter_state),
>                         },
>                 },

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

end of thread, other threads:[~2014-06-08 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-08 13:20 regression in dib0700 James Harper
2014-06-08 15:20 ` 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).