Commit c7ccc1b7 authored by Wolfram Sang's avatar Wolfram Sang Committed by Sam Ravnborg

drm/radeon: convert to use i2c_new_client_device()

Move away from the deprecated API.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200326211005.13301-7-wsa+renesas@sang-engineering.com
parent 3f9becf9
...@@ -2111,7 +2111,7 @@ static int radeon_atombios_parse_power_table_1_3(struct radeon_device *rdev) ...@@ -2111,7 +2111,7 @@ static int radeon_atombios_parse_power_table_1_3(struct radeon_device *rdev)
ucOverdriveThermalController]; ucOverdriveThermalController];
info.addr = power_info->info.ucOverdriveControllerAddress >> 1; info.addr = power_info->info.ucOverdriveControllerAddress >> 1;
strlcpy(info.type, name, sizeof(info.type)); strlcpy(info.type, name, sizeof(info.type));
i2c_new_device(&rdev->pm.i2c_bus->adapter, &info); i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
} }
} }
num_modes = power_info->info.ucNumOfPowerModeEntries; num_modes = power_info->info.ucNumOfPowerModeEntries;
...@@ -2351,7 +2351,7 @@ static void radeon_atombios_add_pplib_thermal_controller(struct radeon_device *r ...@@ -2351,7 +2351,7 @@ static void radeon_atombios_add_pplib_thermal_controller(struct radeon_device *r
const char *name = pp_lib_thermal_controller_names[controller->ucType]; const char *name = pp_lib_thermal_controller_names[controller->ucType];
info.addr = controller->ucI2cAddress >> 1; info.addr = controller->ucI2cAddress >> 1;
strlcpy(info.type, name, sizeof(info.type)); strlcpy(info.type, name, sizeof(info.type));
i2c_new_device(&rdev->pm.i2c_bus->adapter, &info); i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
} }
} else { } else {
DRM_INFO("Unknown thermal controller type %d at 0x%02x %s fan control\n", DRM_INFO("Unknown thermal controller type %d at 0x%02x %s fan control\n",
......
...@@ -2704,7 +2704,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev) ...@@ -2704,7 +2704,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
const char *name = thermal_controller_names[thermal_controller]; const char *name = thermal_controller_names[thermal_controller];
info.addr = i2c_addr >> 1; info.addr = i2c_addr >> 1;
strlcpy(info.type, name, sizeof(info.type)); strlcpy(info.type, name, sizeof(info.type));
i2c_new_device(&rdev->pm.i2c_bus->adapter, &info); i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
} }
} }
} else { } else {
...@@ -2721,7 +2721,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev) ...@@ -2721,7 +2721,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
const char *name = "f75375"; const char *name = "f75375";
info.addr = 0x28; info.addr = 0x28;
strlcpy(info.type, name, sizeof(info.type)); strlcpy(info.type, name, sizeof(info.type));
i2c_new_device(&rdev->pm.i2c_bus->adapter, &info); i2c_new_client_device(&rdev->pm.i2c_bus->adapter, &info);
DRM_INFO("Possible %s thermal controller at 0x%02x\n", DRM_INFO("Possible %s thermal controller at 0x%02x\n",
name, info.addr); name, info.addr);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment