Skip to content

Commit

Permalink
[media] media: em28xx-dvb - fix em28xx_dvb_resume() to not unregister…
Browse files Browse the repository at this point in the history
… i2c and dvb

em28xx_dvb_resume() unregisters i2c tuner, i2c demod, and dvb.
This erroneous cleanup results in i2c tuner, i2c demod, and dvb
devices unregistered and removed during resume. This error is a
result of merge conflict between two patches that went into 3.15.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
  • Loading branch information
Shuah Khan authored and Mauro Carvalho Chehab committed Jul 26, 2014
1 parent 89c5ff0 commit 6eb5e33
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions drivers/media/usb/em28xx/em28xx-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,6 @@ 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]);
Expand All @@ -1724,22 +1723,6 @@ 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);
}

/* remove I2C demod */
client = dvb->i2c_client_demod;
if (client) {
module_put(client->dev.driver->owner);
i2c_unregister_device(client);
}

em28xx_unregister_dvb(dvb);
kfree(dvb);
dev->dvb = NULL;
}

return 0;
Expand Down

0 comments on commit 6eb5e33

Please sign in to comment.