diff options
author | Stefan Ringel <stefan.ringel@arcor.de> | 2011-05-09 16:53:49 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 19:59:23 -0300 |
commit | 1416910743e63e751a95de14c0477e41d54076b7 (patch) | |
tree | 572f5d7fd75e0f5be7b16b6a2f5d5e771195e4a7 /drivers/staging/tm6000 | |
parent | cecc2471ea719a359b253449781a584e319d8909 (diff) | |
download | blackbird-op-linux-1416910743e63e751a95de14c0477e41d54076b7.tar.gz blackbird-op-linux-1416910743e63e751a95de14c0477e41d54076b7.zip |
[media] tm6000: add radio capabilities
add radio capabilities
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/tm6000')
-rw-r--r-- | drivers/staging/tm6000/tm6000-cards.c | 4 | ||||
-rw-r--r-- | drivers/staging/tm6000/tm6000-video.c | 34 | ||||
-rw-r--r-- | drivers/staging/tm6000/tm6000.h | 1 |
3 files changed, 23 insertions, 16 deletions
diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 6e51486dbe64..31ccd2f67b35 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -254,6 +254,7 @@ struct tm6000_board tm6000_boards[] = { .has_zl10353 = 1, .has_eeprom = 1, .has_remote = 1, + .has_radio = 1. .has_input_comp = 1, .has_input_svid = 1, }, @@ -276,6 +277,7 @@ struct tm6000_board tm6000_boards[] = { .has_zl10353 = 0, .has_eeprom = 1, .has_remote = 1, + .has_radio = 1, .has_input_comp = 1, .has_input_svid = 1, }, @@ -350,6 +352,7 @@ struct tm6000_board tm6000_boards[] = { .has_zl10353 = 1, .has_eeprom = 1, .has_remote = 0, + .has_radio = 1, .has_input_comp = 0, .has_input_svid = 0, }, @@ -372,6 +375,7 @@ struct tm6000_board tm6000_boards[] = { .has_zl10353 = 0, .has_eeprom = 1, .has_remote = 0, + .has_radio = 1, .has_input_comp = 0, .has_input_svid = 0, }, diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index f82edfaac522..a434a32454db 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -1730,24 +1730,26 @@ int tm6000_v4l2_register(struct tm6000_core *dev) printk(KERN_INFO "%s: registered device %s\n", dev->name, video_device_node_name(dev->vfd)); - dev->radio_dev = vdev_init(dev, &tm6000_radio_template, - "radio"); - if (!dev->radio_dev) { - printk(KERN_INFO "%s: can't register radio device\n", - dev->name); - return ret; /* FIXME release resource */ - } + if (dev->caps.has_radio) { + dev->radio_dev = vdev_init(dev, &tm6000_radio_template, + "radio"); + if (!dev->radio_dev) { + printk(KERN_INFO "%s: can't register radio device\n", + dev->name); + return ret; /* FIXME release resource */ + } - ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO, - radio_nr); - if (ret < 0) { - printk(KERN_INFO "%s: can't register radio device\n", - dev->name); - return ret; /* FIXME release resource */ - } + ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO, + radio_nr); + if (ret < 0) { + printk(KERN_INFO "%s: can't register radio device\n", + dev->name); + return ret; /* FIXME release resource */ + } - printk(KERN_INFO "%s: registered device %s\n", - dev->name, video_device_node_name(dev->radio_dev)); + printk(KERN_INFO "%s: registered device %s\n", + dev->name, video_device_node_name(dev->radio_dev)); + } printk(KERN_INFO "Trident TVMaster TM5600/TM6000/TM6010 USB2 board (Load status: %d)\n", ret); return ret; diff --git a/drivers/staging/tm6000/tm6000.h b/drivers/staging/tm6000/tm6000.h index fdd6d30fdb41..8cdc992da5a5 100644 --- a/drivers/staging/tm6000/tm6000.h +++ b/drivers/staging/tm6000/tm6000.h @@ -129,6 +129,7 @@ struct tm6000_capabilities { unsigned int has_zl10353:1; unsigned int has_eeprom:1; unsigned int has_remote:1; + unsigned int has_radio:1; unsigned int has_input_comp:1; unsigned int has_input_svid:1; }; |