diff options
author | Antti Palosaari <crope@iki.fi> | 2014-02-12 12:59:37 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-03-31 07:02:16 -0400 |
commit | a83b93a7480441a47856dc9104bea970e84cda87 (patch) | |
tree | 7568e0927e1b10b259f8fe36c0ead576ba5958bf | |
parent | 5eef22031295234990a26d809efb4100c1e60c11 (diff) |
[media] em28xx-dvb: fix PCTV 461e tuner I2C binding
Add missing m88ts2022 module reference counts as removing that module
is not allowed when it is used by em28xx-dvb module. That same module
was not unregistered correctly, fix it too.
Error cases validated by returning errors from m88ds3103, m88ts2022
and a8293 probe().
Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-dvb.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c index 9b3f033e1f09..f599b18ef7ca 100644 --- a/drivers/media/usb/em28xx/em28xx-dvb.c +++ b/drivers/media/usb/em28xx/em28xx-dvb.c | |||
@@ -1630,6 +1630,7 @@ static int em28xx_dvb_resume(struct em28xx *dev) | |||
1630 | em28xx_info("Resuming DVB extension"); | 1630 | em28xx_info("Resuming DVB extension"); |
1631 | if (dev->dvb) { | 1631 | if (dev->dvb) { |
1632 | struct em28xx_dvb *dvb = dev->dvb; | 1632 | struct em28xx_dvb *dvb = dev->dvb; |
1633 | struct i2c_client *client = dvb->i2c_client_tuner; | ||
1633 | 1634 | ||
1634 | if (dvb->fe[0]) { | 1635 | if (dvb->fe[0]) { |
1635 | ret = dvb_frontend_resume(dvb->fe[0]); | 1636 | ret = dvb_frontend_resume(dvb->fe[0]); |
@@ -1640,6 +1641,15 @@ static int em28xx_dvb_resume(struct em28xx *dev) | |||
1640 | ret = dvb_frontend_resume(dvb->fe[1]); | 1641 | ret = dvb_frontend_resume(dvb->fe[1]); |
1641 | em28xx_info("fe1 resume %d", ret); | 1642 | em28xx_info("fe1 resume %d", ret); |
1642 | } | 1643 | } |
1644 | /* remove I2C tuner */ | ||
1645 | if (client) { | ||
1646 | module_put(client->dev.driver->owner); | ||
1647 | i2c_unregister_device(client); | ||
1648 | } | ||
1649 | |||
1650 | em28xx_unregister_dvb(dvb); | ||
1651 | kfree(dvb); | ||
1652 | dev->dvb = NULL; | ||
1643 | } | 1653 | } |
1644 | 1654 | ||
1645 | return 0; | 1655 | return 0; |