Message ID | 20160504063902.0af2f4d7@mir (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, May 3, 2016 at 9:39 PM, Stefan Lippers-Hollmann <s.l-h@gmx.de> wrote: > > Just as a cross-check, this (incomplete, but au0828, cx231xx and em28xx > aren't needed/ loaded on my system) crude revert avoids the problem for > me on v4.6-rc6-113-g83858a7. Hmm. That just open-codes __media_device_usb_init(). The main difference seems to be that __media_device_usb_init() ends up having that #ifdef CONFIG_USB #endif around it. I think that is bogus. What happens if you replace that #ifdef CONFIG_USB in __media_device_usb_init() with #if CONFIG_USB || (MODULE && CONFIG_USB_MODULE) or alternatively just build with USB compiled in? Mauro: that __media_device_usb_init() thing does seem to be completely buggered for the modular USB case. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c +++ b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c @@ -107,7 +107,15 @@ static int dvb_usb_media_device_init(str if (!mdev) return -ENOMEM; - media_device_usb_init(mdev, udev, d->desc->name); + mdev->dev = &udev->dev; + strlcpy(mdev->model, d->desc->name, sizeof(mdev->model)); + if (udev->serial) + strlcpy(mdev->serial, udev->serial, sizeof(mdev->serial)); + strcpy(mdev->bus_info, udev->devpath); + mdev->hw_revision = le16_to_cpu(udev->descriptor.bcdDevice); + mdev->driver_version = LINUX_VERSION_CODE; + + media_device_init(mdev); dvb_register_media_controller(&adap->dvb_adap, mdev); --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c @@ -412,7 +412,15 @@ static int dvb_usbv2_media_device_init(s if (!mdev) return -ENOMEM; - media_device_usb_init(mdev, udev, d->name); + mdev->dev = &udev->dev; + strlcpy(mdev->model, d->name, sizeof(mdev->model)); + if (udev->serial) + strlcpy(mdev->serial, udev->serial, sizeof(mdev->serial)); + strcpy(mdev->bus_info, udev->devpath); + mdev->hw_revision = le16_to_cpu(udev->descriptor.bcdDevice); + mdev->driver_version = LINUX_VERSION_CODE; + + media_device_init(mdev); dvb_register_media_controller(&adap->dvb_adap, mdev);