From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bartlomiej Zolnierkiewicz Subject: Re: [RFC 1/8] thermal: int3400_thermal: Statically initialize .get_mode()/.set_mode() ops Date: Wed, 15 Apr 2020 11:12:02 +0200 Message-ID: <7cbddc1c-0049-6b50-7bca-204bd9df2c30@samsung.com> References: <20200407174926.23971-1-andrzej.p@collabora.com> <20200407174926.23971-2-andrzej.p@collabora.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20200407174926.23971-2-andrzej.p@collabora.com> Content-Language: en-US Sender: linux-acpi-owner@vger.kernel.org To: Andrzej Pietrasiewicz Cc: linux-pm@vger.kernel.org, Zhang Rui , "Rafael J . Wysocki" , Len Brown , Jiri Pirko , Ido Schimmel , "David S . Miller" , Peter Kaestle , Darren Hart , Andy Shevchenko , Support Opensource , Daniel Lezcano , Amit Kucheria , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Allison Randal , Enrico Weigelt List-Id: platform-driver-x86.vger.kernel.org On 4/7/20 7:49 PM, Andrzej Pietrasiewicz wrote: > 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: Andrzej Pietrasiewicz Reviewed-by: Bartlomiej Zolnierkiewicz Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics > --- > drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c > index efae0c02d898..634b943e9e3d 100644 > --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c > +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c > @@ -271,6 +271,8 @@ static int int3400_thermal_set_mode(struct thermal_zone_device *thermal, > > static struct thermal_zone_device_ops int3400_thermal_ops = { > .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 = { > @@ -309,9 +311,6 @@ static int int3400_thermal_probe(struct platform_device *pdev) > > 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, &int3400_thermal_ops, > &int3400_thermal_params, 0, 0); >