aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Ringel <stefan.ringel@arcor.de>2011-05-09 15:53:49 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 18:59:23 -0400
commit1416910743e63e751a95de14c0477e41d54076b7 (patch)
tree572f5d7fd75e0f5be7b16b6a2f5d5e771195e4a7
parentcecc2471ea719a359b253449781a584e319d8909 (diff)
[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>
-rw-r--r--drivers/staging/tm6000/tm6000-cards.c4
-rw-r--r--drivers/staging/tm6000/tm6000-video.c34
-rw-r--r--drivers/staging/tm6000/tm6000.h1
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[] = {
254 .has_zl10353 = 1, 254 .has_zl10353 = 1,
255 .has_eeprom = 1, 255 .has_eeprom = 1,
256 .has_remote = 1, 256 .has_remote = 1,
257 .has_radio = 1.
257 .has_input_comp = 1, 258 .has_input_comp = 1,
258 .has_input_svid = 1, 259 .has_input_svid = 1,
259 }, 260 },
@@ -276,6 +277,7 @@ struct tm6000_board tm6000_boards[] = {
276 .has_zl10353 = 0, 277 .has_zl10353 = 0,
277 .has_eeprom = 1, 278 .has_eeprom = 1,
278 .has_remote = 1, 279 .has_remote = 1,
280 .has_radio = 1,
279 .has_input_comp = 1, 281 .has_input_comp = 1,
280 .has_input_svid = 1, 282 .has_input_svid = 1,
281 }, 283 },
@@ -350,6 +352,7 @@ struct tm6000_board tm6000_boards[] = {
350 .has_zl10353 = 1, 352 .has_zl10353 = 1,
351 .has_eeprom = 1, 353 .has_eeprom = 1,
352 .has_remote = 0, 354 .has_remote = 0,
355 .has_radio = 1,
353 .has_input_comp = 0, 356 .has_input_comp = 0,
354 .has_input_svid = 0, 357 .has_input_svid = 0,
355 }, 358 },
@@ -372,6 +375,7 @@ struct tm6000_board tm6000_boards[] = {
372 .has_zl10353 = 0, 375 .has_zl10353 = 0,
373 .has_eeprom = 1, 376 .has_eeprom = 1,
374 .has_remote = 0, 377 .has_remote = 0,
378 .has_radio = 1,
375 .has_input_comp = 0, 379 .has_input_comp = 0,
376 .has_input_svid = 0, 380 .has_input_svid = 0,
377 }, 381 },
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)
1730 printk(KERN_INFO "%s: registered device %s\n", 1730 printk(KERN_INFO "%s: registered device %s\n",
1731 dev->name, video_device_node_name(dev->vfd)); 1731 dev->name, video_device_node_name(dev->vfd));
1732 1732
1733 dev->radio_dev = vdev_init(dev, &tm6000_radio_template, 1733 if (dev->caps.has_radio) {
1734 "radio"); 1734 dev->radio_dev = vdev_init(dev, &tm6000_radio_template,
1735 if (!dev->radio_dev) { 1735 "radio");
1736 printk(KERN_INFO "%s: can't register radio device\n", 1736 if (!dev->radio_dev) {
1737 dev->name); 1737 printk(KERN_INFO "%s: can't register radio device\n",
1738 return ret; /* FIXME release resource */ 1738 dev->name);
1739 } 1739 return ret; /* FIXME release resource */
1740 }
1740 1741
1741 ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO, 1742 ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO,
1742 radio_nr); 1743 radio_nr);
1743 if (ret < 0) { 1744 if (ret < 0) {
1744 printk(KERN_INFO "%s: can't register radio device\n", 1745 printk(KERN_INFO "%s: can't register radio device\n",
1745 dev->name); 1746 dev->name);
1746 return ret; /* FIXME release resource */ 1747 return ret; /* FIXME release resource */
1747 } 1748 }
1748 1749
1749 printk(KERN_INFO "%s: registered device %s\n", 1750 printk(KERN_INFO "%s: registered device %s\n",
1750 dev->name, video_device_node_name(dev->radio_dev)); 1751 dev->name, video_device_node_name(dev->radio_dev));
1752 }
1751 1753
1752 printk(KERN_INFO "Trident TVMaster TM5600/TM6000/TM6010 USB2 board (Load status: %d)\n", ret); 1754 printk(KERN_INFO "Trident TVMaster TM5600/TM6000/TM6010 USB2 board (Load status: %d)\n", ret);
1753 return ret; 1755 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 {
129 unsigned int has_zl10353:1; 129 unsigned int has_zl10353:1;
130 unsigned int has_eeprom:1; 130 unsigned int has_eeprom:1;
131 unsigned int has_remote:1; 131 unsigned int has_remote:1;
132 unsigned int has_radio:1;
132 unsigned int has_input_comp:1; 133 unsigned int has_input_comp:1;
133 unsigned int has_input_svid:1; 134 unsigned int has_input_svid:1;
134}; 135};