Re: fix PCTV 461e tuner I2C binding

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

 



Moikka Shuah

On 07/08/2014 02:34 AM, Shuah Khan wrote:
Mauro/Antti,

I have been looking at the following commit to

drivers/media/usb/em28xx/em28xx-dvb.c

a83b93a7480441a47856dc9104bea970e84cda87

+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -1630,6 +1630,7 @@ static int em28xx_dvb_resume(struct em28xx *dev)
         em28xx_info("Resuming DVB extension");
         if (dev->dvb) {
                 struct em28xx_dvb *dvb = dev->dvb;
+               struct i2c_client *client = dvb->i2c_client_tuner;

                 if (dvb->fe[0]) {
                         ret = dvb_frontend_resume(dvb->fe[0]);
@@ -1640,6 +1641,15 @@ static int em28xx_dvb_resume(struct em28xx *dev)
                         ret = dvb_frontend_resume(dvb->fe[1]);
                         em28xx_info("fe1 resume %d", ret);
                 }
+               /* remove I2C tuner */
+               if (client) {
+                       module_put(client->dev.driver->owner);
+                       i2c_unregister_device(client);
+               }
+
+               em28xx_unregister_dvb(dvb);
+               kfree(dvb);
+               dev->dvb = NULL;
         }

Why are we unregistering i2c devices and dvb in this resume path?
Looks incorrect to me.

I don't know. Original patch I send was a bit different and tuner was removed only during em28xx_dvb_fini()

https://patchwork.linuxtv.org/patch/22275/

regards
Antti

--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux