]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/dvb/dvb-usb/nova-t-usb2.c
Merge branches 'topic/fix/hda' and 'topic/fix/sound-core' into for-linus
[linux-2.6-omap-h63xx.git] / drivers / media / dvb / dvb-usb / nova-t-usb2.c
index a9219bf69b8927faf0da389c1dddddc06742ef7e..07fb843c7c2b22d35b4a977dd405e2b6d5e97ab7 100644 (file)
@@ -15,6 +15,8 @@ static int debug;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "set debugging level (1=rc,2=eeprom (|-able))." DVB_USB_DEBUG_STATUS);
 
+DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
+
 #define deb_rc(args...) dprintk(debug,0x01,args)
 #define deb_ee(args...) dprintk(debug,0x02,args)
 
@@ -75,7 +77,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 +92,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) {
@@ -140,7 +144,8 @@ static struct dvb_usb_device_properties nova_t_properties;
 static int nova_t_probe(struct usb_interface *intf,
                const struct usb_device_id *id)
 {
-       return dvb_usb_device_init(intf,&nova_t_properties,THIS_MODULE,NULL);
+       return dvb_usb_device_init(intf, &nova_t_properties,
+                                  THIS_MODULE, NULL, adapter_nr);
 }
 
 /* do not change the order of the ID table */
@@ -163,27 +168,28 @@ static struct dvb_usb_device_properties nova_t_properties = {
                        .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,
-                       }
-               }
-       },
+                       .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_device_state),
 
        .power_ctrl       = dibusb2_0_power_ctrl,
        .read_mac_address = nova_t_read_mac_address,