diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-21 01:24:38 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-21 01:24:38 -0400 |
commit | 08c501abf1d2a3ba03b6daef19ed37a9dd8112de (patch) | |
tree | 5f9eac21b496bae1e97a5d0720d4b35542fadce0 | |
parent | 64705827cbd42718a7e2cadc3913a4f2cd4f81f6 (diff) | |
download | mediapointer-dvb-s2-08c501abf1d2a3ba03b6daef19ed37a9dd8112de.tar.gz mediapointer-dvb-s2-08c501abf1d2a3ba03b6daef19ed37a9dd8112de.tar.bz2 |
sms1xxx: simplify smsusb_init_device switch..case block
From: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
-rw-r--r-- | linux/drivers/media/dvb/siano/smsusb.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/linux/drivers/media/dvb/siano/smsusb.c b/linux/drivers/media/dvb/siano/smsusb.c index 2f756d5d4..ed080f8f1 100644 --- a/linux/drivers/media/dvb/siano/smsusb.c +++ b/linux/drivers/media/dvb/siano/smsusb.c @@ -285,7 +285,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 */ @@ -299,36 +298,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 - |