diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-21 08:24:38 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 10:23:15 (GMT) |
commit | 2708e888c57904f78649dcd91dcda9768d580ecf (patch) | |
tree | 430d913b71c1cc48c75038b8fcb6646d57902397 /drivers/media/dvb | |
parent | 0c071f374f66f05aded3be970f683d54fd918806 (diff) | |
download | linux-fsl-qoriq-2708e888c57904f78649dcd91dcda9768d580ecf.tar.xz |
V4L/DVB (8300): sms1xxx: simplify smsusb_init_device switch..case block
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-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 e6ee443..e7e0fe7 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) { struct smsdevice_params_t params; struct smsusb_device_t *dev; - struct sms_board *board; int i, rc; /* create device object */ @@ -295,36 +294,21 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id) usb_set_intfdata(intf, dev); dev->udev = interface_to_usbdev(intf); - board = sms_get_board(board_id); - - switch (board->type) { + params.device_type = sms_get_board(board_id)->type; + switch (params.device_type) { case SMS_STELLAR: dev->buffer_size = USB1_BUFFER_SIZE; params.setmode_handler = smsusb1_setmode; params.detectmode_handler = smsusb1_detectmode; - params.device_type = SMS_STELLAR; - sms_info("stellar device found"); break; default: - switch (board->type) { - case SMS_NOVA_A0: - params.device_type = SMS_NOVA_A0; - sms_info("nova A0 found"); - break; - case SMS_NOVA_B0: - params.device_type = SMS_NOVA_B0; - sms_info("nova B0 found"); - break; - case SMS_VEGA: - params.device_type = SMS_VEGA; - sms_info("Vega found"); - break; - default: - sms_err("Unspecified sms device type!"); - } - + sms_err("Unspecified sms device type!"); + /* fall-thru */ + case SMS_NOVA_A0: + case SMS_NOVA_B0: + case SMS_VEGA: dev->buffer_size = USB2_BUFFER_SIZE; dev->response_alignment = dev->udev->ep_in[1]->desc.wMaxPacketSize - |