git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git]
/
drivers
/
media
/
video
/
em28xx
/
em28xx-dvb.c
diff --git
a/drivers/media/video/em28xx/em28xx-dvb.c
b/drivers/media/video/em28xx/em28xx-dvb.c
index
7df8157
..
0b2333e
100644
(file)
--- a/
drivers/media/video/em28xx/em28xx-dvb.c
+++ b/
drivers/media/video/em28xx/em28xx-dvb.c
@@
-251,7
+251,6
@@
static int attach_xc3028(u8 addr, struct em28xx *dev)
printk(KERN_ERR "%s/2: xc3028 attach failed\n",
dev->name);
dvb_frontend_detach(dev->dvb->frontend);
printk(KERN_ERR "%s/2: xc3028 attach failed\n",
dev->name);
dvb_frontend_detach(dev->dvb->frontend);
- dvb_unregister_frontend(dev->dvb->frontend);
dev->dvb->frontend = NULL;
return -EINVAL;
}
dev->dvb->frontend = NULL;
return -EINVAL;
}
@@
-383,6
+382,11
@@
static int dvb_init(struct em28xx *dev)
int result = 0;
struct em28xx_dvb *dvb;
int result = 0;
struct em28xx_dvb *dvb;
+ if (!dev->has_dvb) {
+ /* This device does not support the extension */
+ return 0;
+ }
+
dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL);
if (dvb == NULL) {
dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL);
if (dvb == NULL) {
@@
-445,6
+449,11
@@
out_free:
static int dvb_fini(struct em28xx *dev)
{
static int dvb_fini(struct em28xx *dev)
{
+ if (!dev->has_dvb) {
+ /* This device does not support the extension */
+ return 0;
+ }
+
if (dev->dvb) {
unregister_dvb(dev->dvb);
dev->dvb = NULL;
if (dev->dvb) {
unregister_dvb(dev->dvb);
dev->dvb = NULL;