forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/media/usb/dvb-usb/technisat-usb2.c
....@@ -330,8 +330,8 @@
330330
331331 /* method to find out whether the firmware has to be downloaded or not */
332332 static int technisat_usb2_identify_state(struct usb_device *udev,
333
- struct dvb_usb_device_properties *props,
334
- struct dvb_usb_device_description **desc, int *cold)
333
+ const struct dvb_usb_device_properties *props,
334
+ const struct dvb_usb_device_description **desc, int *cold)
335335 {
336336 int ret;
337337 u8 *version;
....@@ -566,8 +566,9 @@
566566 a->fe_adap[0].fe->ops.set_voltage = technisat_usb2_set_voltage;
567567
568568 /* if everything was successful assign a nice name to the frontend */
569
- strlcpy(a->fe_adap[0].fe->ops.info.name, a->dev->desc->name,
570
- sizeof(a->fe_adap[0].fe->ops.info.name));
569
+ strscpy(a->fe_adap[0].fe->ops.info.name,
570
+ a->dev->desc->name,
571
+ sizeof(a->fe_adap[0].fe->ops.info.name));
571572 } else {
572573 dvb_frontend_detach(a->fe_adap[0].fe);
573574 a->fe_adap[0].fe = NULL;
....@@ -655,14 +656,14 @@
655656 for (i = 1; i < ARRAY_SIZE(state->buf); i++) {
656657 if (buf[i] == 0xff) {
657658 ev.pulse = 0;
658
- ev.duration = 888888*2;
659
+ ev.duration = 889 * 2;
659660 ir_raw_event_store(d->rc_dev, &ev);
660661 break;
661662 }
662663
663664 ev.pulse = !ev.pulse;
664665 ev.duration = (buf[i] * FIRMWARE_CLOCK_DIVISOR *
665
- FIRMWARE_CLOCK_TICK) / 1000;
666
+ FIRMWARE_CLOCK_TICK) / (1000 * 1000);
666667 ir_raw_event_store(d->rc_dev, &ev);
667668 }
668669