hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/gpu/drm/radeon/atombios_i2c.c
....@@ -22,7 +22,7 @@
2222 * Authors: Alex Deucher
2323 *
2424 */
25
-#include <drm/drmP.h>
25
+
2626 #include <drm/radeon_drm.h>
2727 #include "radeon.h"
2828 #include "atom.h"
....@@ -35,7 +35,7 @@
3535
3636 static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan,
3737 u8 slave_addr, u8 flags,
38
- u8 *buf, u8 num)
38
+ u8 *buf, int num)
3939 {
4040 struct drm_device *dev = chan->dev;
4141 struct radeon_device *rdev = dev->dev_private;
....@@ -68,11 +68,6 @@
6868 memcpy(&out, &buf[1], num);
6969 args.lpI2CDataOut = cpu_to_le16(out);
7070 } 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
- }
7671 args.ucRegIndex = 0;
7772 args.lpI2CDataOut = 0;
7873 }