linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: em28xx-dvb - fix em28xx_dvb_resume() to not unregister i2c and dvb
@ 2014-07-09 13:21 Shuah Khan
  2014-07-12 20:20 ` Antti Palosaari
  0 siblings, 1 reply; 2+ messages in thread
From: Shuah Khan @ 2014-07-09 13:21 UTC (permalink / raw)
  To: m.chehab, crope; +Cc: Shuah Khan, linux-media, linux-kernel

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>
---
 drivers/media/usb/em28xx/em28xx-dvb.c |   17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index a121ed9..d381861 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -1712,7 +1712,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]);
@@ -1723,22 +1722,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;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: em28xx-dvb - fix em28xx_dvb_resume() to not unregister i2c and dvb
  2014-07-09 13:21 [PATCH] media: em28xx-dvb - fix em28xx_dvb_resume() to not unregister i2c and dvb Shuah Khan
@ 2014-07-12 20:20 ` Antti Palosaari
  0 siblings, 0 replies; 2+ messages in thread
From: Antti Palosaari @ 2014-07-12 20:20 UTC (permalink / raw)
  To: Shuah Khan, m.chehab; +Cc: linux-media, linux-kernel

Reviewed-by: Antti Palosaari <crope@iki.fi>

Antti

On 07/09/2014 04:21 PM, Shuah Khan wrote:
> 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>
> ---
>   drivers/media/usb/em28xx/em28xx-dvb.c |   17 -----------------
>   1 file changed, 17 deletions(-)
>
> diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
> index a121ed9..d381861 100644
> --- a/drivers/media/usb/em28xx/em28xx-dvb.c
> +++ b/drivers/media/usb/em28xx/em28xx-dvb.c
> @@ -1712,7 +1712,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]);
> @@ -1723,22 +1722,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;
>

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-12 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-09 13:21 [PATCH] media: em28xx-dvb - fix em28xx_dvb_resume() to not unregister i2c and dvb Shuah Khan
2014-07-12 20:20 ` Antti Palosaari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).