Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Remove unused amdgpu_i2c functions

amdgpu_i2c_add and amdgpu_i2c_init were added in 2015's commit
d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
but never used.

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Dr. David Alan Gilbert and committed by
Alex Deucher
0ee23991 9d7a8bdb

-29
-25
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
··· 225 225 kfree(i2c); 226 226 } 227 227 228 - /* Add the default buses */ 229 - void amdgpu_i2c_init(struct amdgpu_device *adev) 230 - { 231 - if (amdgpu_hw_i2c) 232 - DRM_INFO("hw_i2c forced on, you may experience display detection problems!\n"); 233 - 234 - amdgpu_atombios_i2c_init(adev); 235 - } 236 - 237 228 /* remove all the buses */ 238 229 void amdgpu_i2c_fini(struct amdgpu_device *adev) 239 230 { ··· 234 243 if (adev->i2c_bus[i]) { 235 244 amdgpu_i2c_destroy(adev->i2c_bus[i]); 236 245 adev->i2c_bus[i] = NULL; 237 - } 238 - } 239 - } 240 - 241 - /* Add additional buses */ 242 - void amdgpu_i2c_add(struct amdgpu_device *adev, 243 - const struct amdgpu_i2c_bus_rec *rec, 244 - const char *name) 245 - { 246 - struct drm_device *dev = adev_to_drm(adev); 247 - int i; 248 - 249 - for (i = 0; i < AMDGPU_MAX_I2C_BUS; i++) { 250 - if (!adev->i2c_bus[i]) { 251 - adev->i2c_bus[i] = amdgpu_i2c_create(dev, rec, name); 252 - return; 253 246 } 254 247 } 255 248 }
-4
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h
··· 28 28 const struct amdgpu_i2c_bus_rec *rec, 29 29 const char *name); 30 30 void amdgpu_i2c_destroy(struct amdgpu_i2c_chan *i2c); 31 - void amdgpu_i2c_init(struct amdgpu_device *adev); 32 31 void amdgpu_i2c_fini(struct amdgpu_device *adev); 33 - void amdgpu_i2c_add(struct amdgpu_device *adev, 34 - const struct amdgpu_i2c_bus_rec *rec, 35 - const char *name); 36 32 struct amdgpu_i2c_chan * 37 33 amdgpu_i2c_lookup(struct amdgpu_device *adev, 38 34 const struct amdgpu_i2c_bus_rec *i2c_bus);