.. | .. |
---|
22 | 22 | * Authors: Alex Deucher |
---|
23 | 23 | * |
---|
24 | 24 | */ |
---|
25 | | -#include <drm/drmP.h> |
---|
| 25 | + |
---|
26 | 26 | #include <drm/amdgpu_drm.h> |
---|
27 | 27 | #include "amdgpu.h" |
---|
28 | 28 | #include "atom.h" |
---|
.. | .. |
---|
40 | 40 | u8 *buf, u8 num) |
---|
41 | 41 | { |
---|
42 | 42 | struct drm_device *dev = chan->dev; |
---|
43 | | - struct amdgpu_device *adev = dev->dev_private; |
---|
| 43 | + struct amdgpu_device *adev = drm_to_adev(dev); |
---|
44 | 44 | PROCESS_I2C_CHANNEL_TRANSACTION_PS_ALLOCATION args; |
---|
45 | 45 | int index = GetIndexIntoMasterTable(COMMAND, ProcessI2cChannelTransaction); |
---|
46 | 46 | unsigned char *base; |
---|
.. | .. |
---|
76 | 76 | } |
---|
77 | 77 | args.lpI2CDataOut = cpu_to_le16(out); |
---|
78 | 78 | } else { |
---|
79 | | - if (num > ATOM_MAX_HW_I2C_READ) { |
---|
80 | | - DRM_ERROR("hw i2c: tried to read too many bytes (%d vs 255)\n", num); |
---|
81 | | - r = -EINVAL; |
---|
82 | | - goto done; |
---|
83 | | - } |
---|
84 | 79 | args.ucRegIndex = 0; |
---|
85 | 80 | args.lpI2CDataOut = 0; |
---|
86 | 81 | } |
---|