OSDN Git Service

can: kvaser_pciefd: kvaser_pciefd_pwm_stop(): remove unnecessary code when setting...
authorChrister Beskow <chbe@kvaser.com>
Tue, 6 Aug 2019 07:29:38 +0000 (09:29 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 13 Aug 2019 14:36:52 +0000 (16:36 +0200)
commit1910cd88539c07abf34a558a0976b506483c377c
tree6f0ef3f77b4df9fe2889dbb9c3fb17fdb36413c8
parent53f6f391786e01bf2050c03d8a36d9defdcc2831
can: kvaser_pciefd: kvaser_pciefd_pwm_stop(): remove unnecessary code when setting pwm duty cycle to zero

To set the duty cycle to zero (i.e. pwm_stop), the trigger value shall
be equal to the top value.

This is achieved by reading the value of the top bit field from the pwm
register and then writing back this value to the trigger and top bit
fields.

Addresses-Coverity: ("Logically dead code")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Christer Beskow <chbe@kvaser.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/kvaser_pciefd.c