Commit 79799562 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Daniel Lezcano

thermal: int3400_thermal: Statically initialize .get_mode()/.set_mode() ops

int3400_thermal_ops is used inside int3400_thermal_probe() only after
the assignments, which can just as well be made statically at struct's
initizer.
Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@collabora.com>
Reviewed-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200414180105.20042-2-andrzej.p@collabora.com
parent 48b2bce8
...@@ -271,6 +271,8 @@ static int int3400_thermal_set_mode(struct thermal_zone_device *thermal, ...@@ -271,6 +271,8 @@ static int int3400_thermal_set_mode(struct thermal_zone_device *thermal,
static struct thermal_zone_device_ops int3400_thermal_ops = { static struct thermal_zone_device_ops int3400_thermal_ops = {
.get_temp = int3400_thermal_get_temp, .get_temp = int3400_thermal_get_temp,
.get_mode = int3400_thermal_get_mode,
.set_mode = int3400_thermal_set_mode,
}; };
static struct thermal_zone_params int3400_thermal_params = { static struct thermal_zone_params int3400_thermal_params = {
...@@ -309,9 +311,6 @@ static int int3400_thermal_probe(struct platform_device *pdev) ...@@ -309,9 +311,6 @@ static int int3400_thermal_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, priv); platform_set_drvdata(pdev, priv);
int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0, priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
priv, &int3400_thermal_ops, priv, &int3400_thermal_ops,
&int3400_thermal_params, 0, 0); &int3400_thermal_params, 0, 0);
......
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