Re: m920x fix for TVWalker Twin USB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nick Andrew wrote:
On Tue, May 08, 2007 at 12:37:22PM +1000, Jeremy Nysen wrote:
The following modifications to the m920x_probe() function in m920x.c should fix the problem with the second tuner on the TVWalker Twin USB tuner. Please feel free to refactor and integrate these changes into the main source tree.

I have the TVWalker Twin USB working with both adapters on MythTV and mplayer. There are no spurious adapters in the /dev/dvb/, and

Nice work. So it's just a matter of falling through when probing interface #1 ?
Sorry, I should have made a diff patch that showed the changes more clearly. The pointer to 'd' is not set the second time through, so a valid reference needs to be created for '->udev' in the 'found' section. So, these lines are necessary also:

struct usb_device *udev = interface_to_usbdev(intf);
ret = usb_set_interface(udev, alt->desc.bInterfaceNumber, alt->desc.bAlternateSetting);

Cheers,
Jeremy
   // Initialize the remote control, but only once per adapter
if ( (bInterfaceNumber == 0) && ((ret = m920x_init(d, rc_init_seq)) != 0) )
       return ret;

This could also be done by testing rc_init_seq ...

	if (rc_init_seq) {
		ret = m920x_init(d, rc_init_seq);
	}

	return ret;
Yes, that should work too.
Testing ... nope, I get an oops on the insmod. This is with 2.6.20 ...

Oops is from the null pointer dereference that is fixed with the above couple of lines.

Cheers,
Jeremy

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux