]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/dvb-usb/nova-t-usb2.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / dvb-usb / nova-t-usb2.c
index fac48fc7a4aca3e2b7df0f455be0190d48eb8133..badc468170ea615aff5a0eaa2332cd6559db4f09 100644 (file)
@@ -75,7 +75,7 @@ static int nova_t_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
        u8 key[5],cmd[2] = { DIBUSB_REQ_POLL_REMOTE, 0x35 }, data,toggle,custom;
        u16 raw;
        int i;
-       struct dibusb_state *st = d->priv;
+       struct dibusb_device_state *st = d->priv;
 
        dvb_usb_generic_rw(d,cmd,2,key,5,0);
 
@@ -90,9 +90,11 @@ static int nova_t_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
                        deb_rc("raw key code 0x%02x, 0x%02x, 0x%02x to c: %02x d: %02x toggle: %d\n",key[1],key[2],key[3],custom,data,toggle);
 
                        for (i = 0; i < ARRAY_SIZE(haupp_rc_keys); i++) {
-                               deb_rc("c: %x, d: %x\n",haupp_rc_keys[i].data,haupp_rc_keys[i].custom);
                                if (haupp_rc_keys[i].data == data &&
                                        haupp_rc_keys[i].custom == custom) {
+
+                                       deb_rc("c: %x, d: %x\n",haupp_rc_keys[i].data,haupp_rc_keys[i].custom);
+
                                        *event = haupp_rc_keys[i].event;
                                        *state = REMOTE_KEY_PRESSED;
                                        if (st->old_toggle == toggle) {
@@ -129,17 +131,13 @@ static int nova_t_read_mac_address (struct dvb_usb_device *d, u8 mac[6])
                dibusb_read_eeprom_byte(d,i, &b);
 
                mac[5 - (i - 136)] = b;
-
-/*             deb_ee("%02x ",b);
-               if ((i+1) % 16 == 0)
-                       deb_ee("\n");*/
        }
 
        return 0;
 }
 
 /* USB Driver stuff */
-static struct dvb_usb_properties nova_t_properties;
+static struct dvb_usb_device_properties nova_t_properties;
 
 static int nova_t_probe(struct usb_interface *intf,
                const struct usb_device_id *id)
@@ -153,23 +151,44 @@ static struct usb_device_id nova_t_table [] = {
 /* 01 */       { USB_DEVICE(USB_VID_HAUPPAUGE,     USB_PID_WINTV_NOVA_T_USB2_WARM) },
                        { }             /* Terminating entry */
 };
-MODULE_DEVICE_TABLE (usb, nova_t_table);
+MODULE_DEVICE_TABLE(usb, nova_t_table);
 
-static struct dvb_usb_properties nova_t_properties = {
-       .caps = DVB_USB_HAS_PID_FILTER | DVB_USB_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_IS_AN_I2C_ADAPTER,
-       .pid_filter_count = 32,
+static struct dvb_usb_device_properties nova_t_properties = {
+       .caps = DVB_USB_IS_AN_I2C_ADAPTER,
 
        .usb_ctrl = CYPRESS_FX2,
-       .firmware = "dvb-usb-nova-t-usb2-01.fw",
+       .firmware = "dvb-usb-nova-t-usb2-02.fw",
+
+       .num_adapters     = 1,
+       .adapter          = {
+               {
+                       .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
+                       .pid_filter_count = 32,
+
+                       .streaming_ctrl   = dibusb2_0_streaming_ctrl,
+                       .pid_filter       = dibusb_pid_filter,
+                       .pid_filter_ctrl  = dibusb_pid_filter_ctrl,
+                       .frontend_attach  = dibusb_dib3000mc_frontend_attach,
+                       .tuner_attach     = dibusb_dib3000mc_tuner_attach,
+
+                       /* parameter for the MPEG2-data transfer */
+                                       .stream = {
+                                               .type = USB_BULK,
+                               .count = 7,
+                               .endpoint = 0x06,
+                               .u = {
+                                       .bulk = {
+                                               .buffersize = 4096,
+                                       }
+                               }
+                       },
 
-       .size_of_priv     = sizeof(struct dibusb_state),
+                       .size_of_priv     = sizeof(struct dibusb_state),
+               }
+       },
+       .size_of_priv     = sizeof(struct dibusb_device_state),
 
-       .streaming_ctrl   = dibusb2_0_streaming_ctrl,
-       .pid_filter       = dibusb_pid_filter,
-       .pid_filter_ctrl  = dibusb_pid_filter_ctrl,
        .power_ctrl       = dibusb2_0_power_ctrl,
-       .frontend_attach  = dibusb_dib3000mc_frontend_attach,
-       .tuner_attach     = dibusb_dib3000mc_tuner_attach,
        .read_mac_address = nova_t_read_mac_address,
 
        .rc_interval      = 100,
@@ -180,17 +199,6 @@ static struct dvb_usb_properties nova_t_properties = {
        .i2c_algo         = &dibusb_i2c_algo,
 
        .generic_bulk_ctrl_endpoint = 0x01,
-       /* parameter for the MPEG2-data transfer */
-       .urb = {
-               .type = DVB_USB_BULK,
-               .count = 7,
-               .endpoint = 0x06,
-               .u = {
-                       .bulk = {
-                               .buffersize = 4096,
-                       }
-               }
-       },
 
        .num_device_descs = 1,
        .devices = {
@@ -198,6 +206,7 @@ static struct dvb_usb_properties nova_t_properties = {
                        { &nova_t_table[0], NULL },
                        { &nova_t_table[1], NULL },
                },
+               { NULL },
        }
 };