struct rcar_gen3_thermal_tsc *tscs[TSC_MAX_NUM];
unsigned int num_tscs;
spinlock_t lock; /* Protect interrupts on and off */
+ const struct rcar_gen3_thermal_data *data;
};
struct rcar_gen3_thermal_data {
struct thermal_zone_device *zone;
int ret, irq, i;
char *irqname;
- const struct rcar_gen3_thermal_data *match_data =
- of_device_get_match_data(dev);
/* default values if FUSEs are missing */
/* TODO: Read values from hardware on supported platforms */
if (!priv)
return -ENOMEM;
+ priv->data = of_device_get_match_data(dev);
+
spin_lock_init(&priv->lock);
platform_set_drvdata(pdev, priv);
priv->tscs[i] = tsc;
- match_data->thermal_init(tsc);
+ priv->data->thermal_init(tsc);
rcar_gen3_thermal_calc_coefs(&tsc->coef, ptat, thcode[i]);
zone = devm_thermal_zone_of_sensor_register(dev, i, tsc,