diff options
-rw-r--r-- | drivers/media/dvb/siano/smsusb.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c index e6ee4434a294..e7e0fe735427 100644 --- a/drivers/media/dvb/siano/smsusb.c +++ b/drivers/media/dvb/siano/smsusb.c | |||
@@ -281,7 +281,6 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id) | |||
281 | { | 281 | { |
282 | struct smsdevice_params_t params; | 282 | struct smsdevice_params_t params; |
283 | struct smsusb_device_t *dev; | 283 | struct smsusb_device_t *dev; |
284 | struct sms_board *board; | ||
285 | int i, rc; | 284 | int i, rc; |
286 | 285 | ||
287 | /* create device object */ | 286 | /* create device object */ |
@@ -295,36 +294,21 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id) | |||
295 | usb_set_intfdata(intf, dev); | 294 | usb_set_intfdata(intf, dev); |
296 | dev->udev = interface_to_usbdev(intf); | 295 | dev->udev = interface_to_usbdev(intf); |
297 | 296 | ||
298 | board = sms_get_board(board_id); | 297 | params.device_type = sms_get_board(board_id)->type; |
299 | |||
300 | switch (board->type) { | ||
301 | 298 | ||
299 | switch (params.device_type) { | ||
302 | case SMS_STELLAR: | 300 | case SMS_STELLAR: |
303 | dev->buffer_size = USB1_BUFFER_SIZE; | 301 | dev->buffer_size = USB1_BUFFER_SIZE; |
304 | 302 | ||
305 | params.setmode_handler = smsusb1_setmode; | 303 | params.setmode_handler = smsusb1_setmode; |
306 | params.detectmode_handler = smsusb1_detectmode; | 304 | params.detectmode_handler = smsusb1_detectmode; |
307 | params.device_type = SMS_STELLAR; | ||
308 | sms_info("stellar device found"); | ||
309 | break; | 305 | break; |
310 | default: | 306 | default: |
311 | switch (board->type) { | 307 | sms_err("Unspecified sms device type!"); |
312 | case SMS_NOVA_A0: | 308 | /* fall-thru */ |
313 | params.device_type = SMS_NOVA_A0; | 309 | case SMS_NOVA_A0: |
314 | sms_info("nova A0 found"); | 310 | case SMS_NOVA_B0: |
315 | break; | 311 | case SMS_VEGA: |
316 | case SMS_NOVA_B0: | ||
317 | params.device_type = SMS_NOVA_B0; | ||
318 | sms_info("nova B0 found"); | ||
319 | break; | ||
320 | case SMS_VEGA: | ||
321 | params.device_type = SMS_VEGA; | ||
322 | sms_info("Vega found"); | ||
323 | break; | ||
324 | default: | ||
325 | sms_err("Unspecified sms device type!"); | ||
326 | } | ||
327 | |||
328 | dev->buffer_size = USB2_BUFFER_SIZE; | 312 | dev->buffer_size = USB2_BUFFER_SIZE; |
329 | dev->response_alignment = | 313 | dev->response_alignment = |
330 | dev->udev->ep_in[1]->desc.wMaxPacketSize - | 314 | dev->udev->ep_in[1]->desc.wMaxPacketSize - |