Re: [PATCH 6/6] EM28xx - don't sleep on disconnect

2011-08-20 Thread Chris Rankin
Here's the updated patch that checks whether the frontend exists before disabling the sleep operations. Cheers, Chris --- linux-3.0/drivers/media/common/tuners/tda18271-fe.c.orig2011-08-20 18:53:48.0 +0100 +++ linux-3.0/drivers/media/common/tuners/tda18271-fe.c 2011-08-20 19:21:34

Re: [PATCH 6/6] EM28xx - don't sleep on disconnect

2011-08-20 Thread Mauro Carvalho Chehab
Em 20-08-2011 06:46, Chris Rankin escreveu: > --- On Sat, 20/8/11, Mauro Carvalho Chehab wrot >> >> This will cause an OOPS if dvb->fe[n] == NULL. >> > > OK, that's trivially fixable. I'll send you an updated patch. Is it safe to > assume that dvb->fe[0] at least will always be non-NULL? No, it

Re: [PATCH 6/6] EM28xx - don't sleep on disconnect

2011-08-20 Thread Chris Rankin
--- On Sat, 20/8/11, Mauro Carvalho Chehab wrot > > This will cause an OOPS if dvb->fe[n] == NULL. > OK, that's trivially fixable. I'll send you an updated patch. Is it safe to assume that dvb->fe[0] at least will always be non-NULL? Cheers, Chris -- To unsubscribe from this list: send the l

Re: [PATCH 6/6] EM28xx - don't sleep on disconnect

2011-08-20 Thread Mauro Carvalho Chehab
Em 20-08-2011 04:37, Chris Rankin escreveu: > + > + if (dev->state & DEV_DISCONNECTED) { > + /* We cannot tell the device to sleep > + * once it has been unplugged. */ > + prevent_sleep(&dvb->fe[0]->ops); > +

[PATCH 6/6] EM28xx - don't sleep on disconnect

2011-08-20 Thread Chris Rankin
The DVB framework will try to power-down an adapter that no-one is using any more, but this assumes that the adapter is still connected to the machine. That's not always true for a USB adapter, so disable the sleep operations when the adapter has been physically unplugged. This prevents I2C wr