mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 06:01:53 +02:00
drm/amd/display/dm: drop extra parameters to create_i2c()
link_index can be fetched from the ddc_service; no need for a separate parameter. res is not used. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
8064ca6e93
commit
0371dbd423
|
|
@ -8322,9 +8322,7 @@ static const struct i2c_algorithm amdgpu_dm_i2c_algo = {
|
|||
};
|
||||
|
||||
static struct amdgpu_i2c_adapter *
|
||||
create_i2c(struct ddc_service *ddc_service,
|
||||
int link_index,
|
||||
int *res)
|
||||
create_i2c(struct ddc_service *ddc_service)
|
||||
{
|
||||
struct amdgpu_device *adev = ddc_service->ctx->driver_context;
|
||||
struct amdgpu_i2c_adapter *i2c;
|
||||
|
|
@ -8335,7 +8333,8 @@ create_i2c(struct ddc_service *ddc_service,
|
|||
i2c->base.owner = THIS_MODULE;
|
||||
i2c->base.dev.parent = &adev->pdev->dev;
|
||||
i2c->base.algo = &amdgpu_dm_i2c_algo;
|
||||
snprintf(i2c->base.name, sizeof(i2c->base.name), "AMDGPU DM i2c hw bus %d", link_index);
|
||||
snprintf(i2c->base.name, sizeof(i2c->base.name), "AMDGPU DM i2c hw bus %d",
|
||||
ddc_service->link->link_index);
|
||||
i2c_set_adapdata(&i2c->base, i2c);
|
||||
i2c->ddc_service = ddc_service;
|
||||
|
||||
|
|
@ -8383,7 +8382,7 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
|
|||
link->priv = aconnector;
|
||||
|
||||
|
||||
i2c = create_i2c(link->ddc, link->link_index, &res);
|
||||
i2c = create_i2c(link->ddc);
|
||||
if (!i2c) {
|
||||
DRM_ERROR("Failed to create i2c adapter data\n");
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user