struct rcar_gen3_thermal_priv {
        struct rcar_gen3_thermal_tsc *tscs[TSC_MAX_NUM];
+       struct thermal_zone_device_ops ops;
        unsigned int num_tscs;
        void (*thermal_init)(struct rcar_gen3_thermal_tsc *tsc);
        int ptat[3];
        return 0;
 }
 
-static struct thermal_zone_device_ops rcar_gen3_tz_of_ops = {
+static const struct thermal_zone_device_ops rcar_gen3_tz_of_ops = {
        .get_temp       = rcar_gen3_thermal_get_temp,
        .set_trips      = rcar_gen3_thermal_set_trips,
 };
        if (!priv)
                return -ENOMEM;
 
+       priv->ops = rcar_gen3_tz_of_ops;
        priv->thermal_init = rcar_gen3_thermal_init;
        if (soc_device_match(r8a7795es1))
                priv->thermal_init = rcar_gen3_thermal_init_r8a7795es1;
        platform_set_drvdata(pdev, priv);
 
        if (rcar_gen3_thermal_request_irqs(priv, pdev))
-               rcar_gen3_tz_of_ops.set_trips = NULL;
+               priv->ops.set_trips = NULL;
 
        pm_runtime_enable(dev);
        pm_runtime_get_sync(dev);
        for (i = 0; i < priv->num_tscs; i++) {
                struct rcar_gen3_thermal_tsc *tsc = priv->tscs[i];
 
-               zone = devm_thermal_of_zone_register(dev, i, tsc,
-                                                    &rcar_gen3_tz_of_ops);
+               zone = devm_thermal_of_zone_register(dev, i, tsc, &priv->ops);
                if (IS_ERR(zone)) {
                        dev_err(dev, "Sensor %u: Can't register thermal zone\n", i);
                        ret = PTR_ERR(zone);