diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-18 12:17:14 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-18 12:17:14 -0300 |
commit | 976a91082e499203f3700aa589a54aefedc3c22a (patch) | |
tree | 311541d0a78d789d3f59dbba22637ce262227f51 /linux/drivers/media/video/v4l2-device.c | |
parent | d42d95e43ed8a60e001ff0a8a4f323380098be7d (diff) | |
parent | 70bbc9f369222fa300c1fcb727eefd22da4db452 (diff) | |
download | mediapointer-dvb-s2-976a91082e499203f3700aa589a54aefedc3c22a.tar.gz mediapointer-dvb-s2-976a91082e499203f3700aa589a54aefedc3c22a.tar.bz2 |
merge: http://linuxtv.org/hg/~dheitmueller/hvr950q-analog2
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/v4l2-device.c')
-rw-r--r-- | linux/drivers/media/video/v4l2-device.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/linux/drivers/media/video/v4l2-device.c b/linux/drivers/media/video/v4l2-device.c index 35e42e947..2cb81c210 100644 --- a/linux/drivers/media/video/v4l2-device.c +++ b/linux/drivers/media/video/v4l2-device.c @@ -50,19 +50,26 @@ int v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev) } EXPORT_SYMBOL_GPL(v4l2_device_register); +void v4l2_device_disconnect(struct v4l2_device *v4l2_dev) +{ + if (v4l2_dev->dev) { + dev_set_drvdata(v4l2_dev->dev, NULL); + v4l2_dev->dev = NULL; + } +} +EXPORT_SYMBOL_GPL(v4l2_device_disconnect); + void v4l2_device_unregister(struct v4l2_device *v4l2_dev) { struct v4l2_subdev *sd, *next; if (v4l2_dev == NULL) return; - if (v4l2_dev->dev) - dev_set_drvdata(v4l2_dev->dev, NULL); + v4l2_device_disconnect(v4l2_dev); + /* Unregister subdevs */ list_for_each_entry_safe(sd, next, &v4l2_dev->subdevs, list) v4l2_device_unregister_subdev(sd); - - v4l2_dev->dev = NULL; } EXPORT_SYMBOL_GPL(v4l2_device_unregister); |