diff options
Diffstat (limited to 'drivers/media/usb/dvb-usb/technisat-usb2.c')
| -rw-r--r-- | drivers/media/usb/dvb-usb/technisat-usb2.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/media/usb/dvb-usb/technisat-usb2.c b/drivers/media/usb/dvb-usb/technisat-usb2.c index f172120db2aa..1e43aab2bc27 100644 --- a/drivers/media/usb/dvb-usb/technisat-usb2.c +++ b/drivers/media/usb/dvb-usb/technisat-usb2.c @@ -199,7 +199,7 @@ static u32 technisat_usb2_i2c_func(struct i2c_adapter *adapter) return I2C_FUNC_I2C; } -static struct i2c_algorithm technisat_usb2_i2c_algo = { +static const struct i2c_algorithm technisat_usb2_i2c_algo = { .master_xfer = technisat_usb2_i2c_xfer, .functionality = technisat_usb2_i2c_func, }; @@ -656,14 +656,14 @@ unlock: for (i = 1; i < ARRAY_SIZE(state->buf); i++) { if (buf[i] == 0xff) { ev.pulse = 0; - ev.duration = 888888*2; + ev.duration = 889 * 2; ir_raw_event_store(d->rc_dev, &ev); break; } ev.pulse = !ev.pulse; ev.duration = (buf[i] * FIRMWARE_CLOCK_DIVISOR * - FIRMWARE_CLOCK_TICK) / 1000; + FIRMWARE_CLOCK_TICK) / (1000 * 1000); ir_raw_event_store(d->rc_dev, &ev); } @@ -689,10 +689,15 @@ static int technisat_usb2_rc_query(struct dvb_usb_device *d) } /* DVB-USB and USB stuff follows */ -static struct usb_device_id technisat_usb2_id_table[] = { - { USB_DEVICE(USB_VID_TECHNISAT, USB_PID_TECHNISAT_USB2_DVB_S2) }, - { 0 } /* Terminating entry */ +enum { + TECHNISAT_USB2_DVB_S2, }; + +static const struct usb_device_id technisat_usb2_id_table[] = { + DVB_USB_DEV(TECHNISAT, TECHNISAT_USB2_DVB_S2), + { } +}; + MODULE_DEVICE_TABLE(usb, technisat_usb2_id_table); /* device description */ @@ -738,7 +743,7 @@ static struct dvb_usb_device_properties technisat_usb2_devices = { .num_device_descs = 1, .devices = { { "Technisat SkyStar USB HD (DVB-S/S2)", - { &technisat_usb2_id_table[0], NULL }, + { &technisat_usb2_id_table[TECHNISAT_USB2_DVB_S2], NULL }, { NULL }, }, }, @@ -781,7 +786,7 @@ static void technisat_usb2_disconnect(struct usb_interface *intf) { struct dvb_usb_device *dev = usb_get_intfdata(intf); - /* work and stuff was only created when the device is is hot-state */ + /* work and stuff was only created when the device is hot-state */ if (dev != NULL) { struct technisat_usb2_state *state = dev->priv; if (state != NULL) |
