]> git.baikalelectronics.ru Git - kernel.git/commitdiff
can: peak_usb: remove write only variable struct peak_usb_adapter::ts_period
authorMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 3 Apr 2021 12:10:25 +0000 (14:10 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 13 Apr 2021 08:15:43 +0000 (10:15 +0200)
The variable struct peak_usb_adapter::ts_period is only ever written
to. This patch removes it from the driver.

Link: https://lore.kernel.org/r/20210406111622.1874957-5-mkl@pengutronix.de
Acked-by: Stephane Grosjean <s.grosjean@peak-system.com>
Tested-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/peak_usb/pcan_usb.c
drivers/net/can/usb/peak_usb/pcan_usb_core.h
drivers/net/can/usb/peak_usb/pcan_usb_fd.c
drivers/net/can/usb/peak_usb/pcan_usb_pro.c

index e23049c811595932802a67d627c51aafb4f19070..38bee69ff48a964e56172a906e179e931f424957 100644 (file)
@@ -1050,7 +1050,6 @@ const struct peak_usb_adapter pcan_usb = {
 
        /* timestamps usage */
        .ts_used_bits = 16,
-       .ts_period = 24575, /* calibration period in ts. */
        .us_per_ts_scale = PCAN_USB_TS_US_PER_TICK, /* us=(ts*scale) */
        .us_per_ts_shift = PCAN_USB_TS_DIV_SHIFTER, /*  >> shift     */
 
index 64c4c22bb296b1de266aa9e134ef2ff452149f12..b00a4811bf61fd6f5ec1c74ab503c893a1215c6e 100644 (file)
@@ -73,7 +73,6 @@ struct peak_usb_adapter {
        u8 ep_msg_in;
        u8 ep_msg_out[PCAN_USB_MAX_CHANNEL];
        u8 ts_used_bits;
-       u32 ts_period;
        u8 us_per_ts_shift;
        u32 us_per_ts_scale;
 
index 6f62b6f5105112c10bd9b0d72b866f9e4a965f71..b11eabad575bb5003bc35ca6dce0af40d64a6fe7 100644 (file)
@@ -1081,7 +1081,6 @@ const struct peak_usb_adapter pcan_usb_fd = {
 
        /* timestamps usage */
        .ts_used_bits = 32,
-       .ts_period = 1000000, /* calibration period in ts. */
        .us_per_ts_scale = 1, /* us = (ts * scale) >> shift */
        .us_per_ts_shift = 0,
 
@@ -1156,7 +1155,6 @@ const struct peak_usb_adapter pcan_usb_chip = {
 
        /* timestamps usage */
        .ts_used_bits = 32,
-       .ts_period = 1000000, /* calibration period in ts. */
        .us_per_ts_scale = 1, /* us = (ts * scale) >> shift */
        .us_per_ts_shift = 0,
 
@@ -1231,7 +1229,6 @@ const struct peak_usb_adapter pcan_usb_pro_fd = {
 
        /* timestamps usage */
        .ts_used_bits = 32,
-       .ts_period = 1000000, /* calibration period in ts. */
        .us_per_ts_scale = 1, /* us = (ts * scale) >> shift */
        .us_per_ts_shift = 0,
 
@@ -1306,7 +1303,6 @@ const struct peak_usb_adapter pcan_usb_x6 = {
 
        /* timestamps usage */
        .ts_used_bits = 32,
-       .ts_period = 1000000, /* calibration period in ts. */
        .us_per_ts_scale = 1, /* us = (ts * scale) >> shift */
        .us_per_ts_shift = 0,
 
index ecb08359f7191840564d070bb00abeeb6fd845cb..589ba797fb33f6e554215e79d0f1a1fd02d49ab6 100644 (file)
@@ -1058,7 +1058,6 @@ const struct peak_usb_adapter pcan_usb_pro = {
 
        /* timestamps usage */
        .ts_used_bits = 32,
-       .ts_period = 1000000, /* calibration period in ts. */
        .us_per_ts_scale = 1, /* us = (ts * scale) >> shift */
        .us_per_ts_shift = 0,