linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: au0828 fix to clear enable/disable/change source handlers
@ 2016-03-13  3:57 Shuah Khan
  2016-03-13  4:15 ` kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Shuah Khan @ 2016-03-13  3:57 UTC (permalink / raw)
  To: mchehab, hans.verkuil, chehabrafael; +Cc: Shuah Khan, linux-media, linux-kernel

Fix to clear enable/disable/change source handlers in the media device
when media device is unregistered in au0828_unregister_media_device().
When au0828 module is removed, snd-usb-audio shouldn't call the handlers.
Clearing will ensure snd-usb-audio won't call them once au0828 is removed.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 drivers/media/usb/au0828/au0828-core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
index de9ab11..abdb956 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -137,6 +137,12 @@ static void au0828_unregister_media_device(struct au0828_dev *dev)
 #ifdef CONFIG_MEDIA_CONTROLLER
 	if (dev->media_dev &&
 		media_devnode_is_registered(&dev->media_dev->devnode)) {
+		/* clear enable_source, disable_source, change_source */
+		dev->media_dev->source_priv = NULL;
+		dev->media_dev->enable_source = NULL;
+		dev->media_dev->disable_source = NULL;
+		dev->media_dev->change_source = NULL;
+
 		media_device_unregister(dev->media_dev);
 		media_device_cleanup(dev->media_dev);
 		dev->media_dev = NULL;
-- 
2.5.0


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

* Re: [PATCH] media: au0828 fix to clear enable/disable/change source handlers
  2016-03-13  3:57 [PATCH] media: au0828 fix to clear enable/disable/change source handlers Shuah Khan
@ 2016-03-13  4:15 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2016-03-13  4:15 UTC (permalink / raw)
  To: Shuah Khan
  Cc: kbuild-all, mchehab, hans.verkuil, chehabrafael, Shuah Khan,
	linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1540 bytes --]

Hi Shuah,

[auto build test ERROR on sailus-media/master]
[also build test ERROR on next-20160311]
[cannot apply to v4.5-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Shuah-Khan/media-au0828-fix-to-clear-enable-disable-change-source-handlers/20160313-120037
base:   git://linuxtv.org/media_tree.git master
config: i386-randconfig-x003-201611 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/media/usb/au0828/au0828-core.c: In function 'au0828_unregister_media_device':
>> drivers/media/usb/au0828/au0828-core.c:144:17: error: 'struct media_device' has no member named 'change_source'
      dev->media_dev->change_source = NULL;
                    ^

vim +144 drivers/media/usb/au0828/au0828-core.c

   138		if (dev->media_dev &&
   139			media_devnode_is_registered(&dev->media_dev->devnode)) {
   140			/* clear enable_source, disable_source, change_source */
   141			dev->media_dev->source_priv = NULL;
   142			dev->media_dev->enable_source = NULL;
   143			dev->media_dev->disable_source = NULL;
 > 144			dev->media_dev->change_source = NULL;
   145	
   146			media_device_unregister(dev->media_dev);
   147			media_device_cleanup(dev->media_dev);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 26788 bytes --]

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

end of thread, other threads:[~2016-03-13  4:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-13  3:57 [PATCH] media: au0828 fix to clear enable/disable/change source handlers Shuah Khan
2016-03-13  4:15 ` kbuild test robot

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).