|
@@ -75,6 +75,7 @@ struct rcar_gen3_thermal_tsc {
|
|
|
|
|
|
struct rcar_gen3_thermal_priv {
|
|
struct rcar_gen3_thermal_priv {
|
|
struct rcar_gen3_thermal_tsc *tscs[TSC_MAX_NUM];
|
|
struct rcar_gen3_thermal_tsc *tscs[TSC_MAX_NUM];
|
|
|
|
+ unsigned int num_tscs;
|
|
};
|
|
};
|
|
|
|
|
|
struct rcar_gen3_thermal_data {
|
|
struct rcar_gen3_thermal_data {
|
|
@@ -307,6 +308,13 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
|
|
tsc->zone = zone;
|
|
tsc->zone = zone;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ priv->num_tscs = i;
|
|
|
|
+
|
|
|
|
+ if (!priv->num_tscs) {
|
|
|
|
+ ret = -ENODEV;
|
|
|
|
+ goto error_unregister;
|
|
|
|
+ }
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
error_unregister:
|
|
error_unregister:
|