@@ -339,7 +339,7 @@ struct tegra_soctherm {
u32 *calib;
struct thermal_zone_device **thermctl_tzs;
- struct tegra_soctherm_soc *soc;
+ const struct tegra_soctherm_soc *soc;
struct soctherm_throt_cfg throt_cfgs[THROTTLE_SIZE];
@@ -2054,19 +2054,15 @@ MODULE_DEVICE_TABLE(of, tegra_soctherm_of_match);
static int tegra_soctherm_probe(struct platform_device *pdev)
{
- const struct of_device_id *match;
struct tegra_soctherm *tegra;
struct thermal_zone_device *z;
struct tsensor_shared_calib shared_calib;
- struct tegra_soctherm_soc *soc;
+ const struct tegra_soctherm_soc *soc;
unsigned int i;
int err;
- match = of_match_node(tegra_soctherm_of_match, pdev->dev.of_node);
- if (!match)
- return -ENODEV;
+ soc = device_get_match_data(&pdev->dev);
- soc = (struct tegra_soctherm_soc *)match->data;
if (soc->num_ttgs > TEGRA124_SOCTHERM_SENSOR_NUM)
return -EINVAL;
@@ -2222,7 +2218,7 @@ static int __maybe_unused soctherm_suspend(struct device *dev)
static int __maybe_unused soctherm_resume(struct device *dev)
{
struct tegra_soctherm *tegra = dev_get_drvdata(dev);
- struct tegra_soctherm_soc *soc = tegra->soc;
+ const struct tegra_soctherm_soc *soc = tegra->soc;
int err, i;
err = soctherm_clk_enable(tegra, true);