diff options
Diffstat (limited to 'drivers/gpu/drm/i2c/tda998x_drv.c')
-rw-r--r-- | drivers/gpu/drm/i2c/tda998x_drv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 48af5cac1902..240c331405b9 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c | |||
@@ -568,11 +568,11 @@ static irqreturn_t tda998x_irq_thread(int irq, void *data) | |||
568 | 568 | ||
569 | static uint8_t tda998x_cksum(uint8_t *buf, size_t bytes) | 569 | static uint8_t tda998x_cksum(uint8_t *buf, size_t bytes) |
570 | { | 570 | { |
571 | uint8_t sum = 0; | 571 | int sum = 0; |
572 | 572 | ||
573 | while (bytes--) | 573 | while (bytes--) |
574 | sum += *buf++; | 574 | sum -= *buf++; |
575 | return (255 - sum) + 1; | 575 | return sum; |
576 | } | 576 | } |
577 | 577 | ||
578 | #define HB(x) (x) | 578 | #define HB(x) (x) |