.. | .. |
---|
22 | 22 | * Authors: Alex Deucher |
---|
23 | 23 | * |
---|
24 | 24 | */ |
---|
25 | | -#include <drm/drmP.h> |
---|
| 25 | + |
---|
26 | 26 | #include <drm/radeon_drm.h> |
---|
27 | 27 | #include "radeon.h" |
---|
28 | 28 | #include "atom.h" |
---|
.. | .. |
---|
35 | 35 | |
---|
36 | 36 | static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan, |
---|
37 | 37 | u8 slave_addr, u8 flags, |
---|
38 | | - u8 *buf, u8 num) |
---|
| 38 | + u8 *buf, int num) |
---|
39 | 39 | { |
---|
40 | 40 | struct drm_device *dev = chan->dev; |
---|
41 | 41 | struct radeon_device *rdev = dev->dev_private; |
---|
.. | .. |
---|
68 | 68 | memcpy(&out, &buf[1], num); |
---|
69 | 69 | args.lpI2CDataOut = cpu_to_le16(out); |
---|
70 | 70 | } else { |
---|
71 | | - if (num > ATOM_MAX_HW_I2C_READ) { |
---|
72 | | - DRM_ERROR("hw i2c: tried to read too many bytes (%d vs 255)\n", num); |
---|
73 | | - r = -EINVAL; |
---|
74 | | - goto done; |
---|
75 | | - } |
---|
76 | 71 | args.ucRegIndex = 0; |
---|
77 | 72 | args.lpI2CDataOut = 0; |
---|
78 | 73 | } |
---|