lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 6 Sep 2022 16:11:03 +0300
From:   Dmitry Osipenko <dmitry.osipenko@...labora.com>
To:     Daniel Lezcano <daniel.lezcano@...exp.org>,
        daniel.lezcano@...aro.org, rafael@...nel.org
Cc:     rui.zhang@...el.com, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, khilman@...libre.com,
        abailon@...libre.com, lukasz.luba@....com, broonie@...nel.org,
        damien.lemoal@...nsource.wdc.com, heiko@...ech.de,
        hayashi.kunihiko@...ionext.com, mhiramat@...nel.org,
        talel@...zon.com, thierry.reding@...il.com, digetx@...il.com,
        jonathanh@...dia.com, anarsoul@...il.com, tiny.windzz@...il.com,
        baolin.wang7@...il.com, f.fainelli@...il.com,
        bjorn.andersson@...aro.org, mcoquelin.stm32@...il.com,
        glaroque@...libre.com, miquel.raynal@...tlin.com,
        shawnguo@...nel.org, niklas.soderlund@...natech.se,
        matthias.bgg@...il.com, j-keerthy@...com,
        Amit Kucheria <amitk@...nel.org>,
        Mikko Perttunen <mperttunen@...dia.com>,
        "open list:TEGRA ARCHITECTURE SUPPORT" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v5 07/33] thermal/drivers/tegra: Switch to new of API

On 8/5/22 01:43, Daniel Lezcano wrote:
> diff --git a/drivers/thermal/tegra/tegra30-tsensor.c b/drivers/thermal/tegra/tegra30-tsensor.c
> index 05886684f429..c34501287e96 100644
> --- a/drivers/thermal/tegra/tegra30-tsensor.c
> +++ b/drivers/thermal/tegra/tegra30-tsensor.c
> @@ -159,9 +159,9 @@ static void devm_tegra_tsensor_hw_disable(void *data)
>  	tegra_tsensor_hw_disable(ts);
>  }
>  
> -static int tegra_tsensor_get_temp(void *data, int *temp)
> +static int tegra_tsensor_get_temp(struct thermal_zone_device *tz, int *temp)
>  {
> -	const struct tegra_tsensor_channel *tsc = data;
> +	const struct tegra_tsensor_channel *tsc = tz->devdata;
>  	const struct tegra_tsensor *ts = tsc->ts;
>  	int err, c1, c2, c3, c4, counter;
>  	u32 val;
> @@ -217,9 +217,9 @@ static int tegra_tsensor_temp_to_counter(const struct tegra_tsensor *ts, int tem
>  	return DIV_ROUND_CLOSEST(c2 * 1000000 - ts->calib.b, ts->calib.a);
>  }
>  
> -static int tegra_tsensor_set_trips(void *data, int low, int high)
> +static int tegra_tsensor_set_trips(struct thermal_zone_device *tz, int low, int high)
>  {
> -	const struct tegra_tsensor_channel *tsc = data;
> +	const struct tegra_tsensor_channel *tsc = tz->devdata;
>  	const struct tegra_tsensor *ts = tsc->ts;
>  	u32 val;
>  
> @@ -240,7 +240,7 @@ static int tegra_tsensor_set_trips(void *data, int low, int high)
>  	return 0;
>  }
>  
> -static const struct thermal_zone_of_device_ops ops = {
> +static const struct thermal_zone_device_ops ops = {
>  	.get_temp = tegra_tsensor_get_temp,
>  	.set_trips = tegra_tsensor_set_trips,
>  };
> @@ -516,7 +516,7 @@ static int tegra_tsensor_register_channel(struct tegra_tsensor *ts,
>  	tsc->id = id;
>  	tsc->regs = ts->regs + 0x40 * (hw_id + 1);
>  
> -	tsc->tzd = devm_thermal_zone_of_sensor_register(ts->dev, id, tsc, &ops);
> +	tsc->tzd = devm_thermal_of_zone_register(ts->dev, id, tsc, &ops);
>  	if (IS_ERR(tsc->tzd)) {
>  		if (PTR_ERR(tsc->tzd) != -ENODEV)
>  			return dev_err_probe(ts->dev, PTR_ERR(tsc->tzd),

Tested-by: Dmitry Osipenko <dmitry.osipenko@...labora.com> # Nexus7

-- 
Best regards,
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ