From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Avi Fishman <avifishman70@gmail.com>,
Tomer Maimon <tmaimon77@gmail.com>,
Tali Perry <tali.perry1@gmail.com>,
Patrick Venture <venture@google.com>,
Nancy Yuen <yuenn@google.com>,
Benjamin Fair <benjaminfair@google.com>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
openbmc@lists.ozlabs.org, linux-hwmon@vger.kernel.org
Subject: [PATCH 2/2] hwmon: (npcm750-pwm-fan) Remove another unused field in struct npcm7xx_cooling_device
Date: Tue, 30 Apr 2024 21:35:38 +0200 [thread overview]
Message-ID: <2ff738663d40ac5ae3d0b4d2e688ff7e36032be8.1714505655.git.christophe.jaillet@wanadoo.fr> (raw)
In-Reply-To: <74eee8aa739f94b8c6425ce3e37a427ca92243ea.1714505655.git.christophe.jaillet@wanadoo.fr>
In "struct npcm7xx_cooling_device", the 'pwm_clk_freq' field is only
written and never used.
Remove it and update npcm7xx_pwm_init() accordingly.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested only.
---
drivers/hwmon/npcm750-pwm-fan.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c
index 6d92a3b89198..bc8db1dc595d 100644
--- a/drivers/hwmon/npcm750-pwm-fan.c
+++ b/drivers/hwmon/npcm750-pwm-fan.c
@@ -196,7 +196,6 @@ struct npcm7xx_pwm_fan_data {
void __iomem *pwm_base;
void __iomem *fan_base;
int pwm_modules;
- unsigned long pwm_clk_freq;
struct clk *pwm_clk;
struct clk *fan_clk;
struct mutex pwm_lock[NPCM7XX_PWM_MAX_MODULES];
@@ -691,11 +690,12 @@ static u32 npcm7xx_pwm_init(struct npcm7xx_pwm_fan_data *data)
{
int m, ch;
u32 prescale_val, output_freq;
+ unsigned long pwm_clk_freq;
- data->pwm_clk_freq = clk_get_rate(data->pwm_clk);
+ pwm_clk_freq = clk_get_rate(data->pwm_clk);
/* Adjust NPCM7xx PWMs output frequency to ~25Khz */
- output_freq = data->pwm_clk_freq / PWN_CNT_DEFAULT;
+ output_freq = pwm_clk_freq / PWN_CNT_DEFAULT;
prescale_val = DIV_ROUND_CLOSEST(output_freq, PWM_OUTPUT_FREQ_25KHZ);
/* If prescale_val = 0, then the prescale output clock is stopped */
--
2.44.0
next prev parent reply other threads:[~2024-04-30 19:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 19:35 [PATCH 1/2] hwmon: (npcm750-pwm-fan) Remove an unused field in struct npcm7xx_cooling_device Christophe JAILLET
2024-04-30 19:35 ` Christophe JAILLET [this message]
2024-05-01 14:47 ` [PATCH 2/2] hwmon: (npcm750-pwm-fan) Remove another " Guenter Roeck
2024-05-01 14:46 ` [PATCH 1/2] hwmon: (npcm750-pwm-fan) Remove an " Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2ff738663d40ac5ae3d0b4d2e688ff7e36032be8.1714505655.git.christophe.jaillet@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=avifishman70@gmail.com \
--cc=benjaminfair@google.com \
--cc=jdelvare@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=openbmc@lists.ozlabs.org \
--cc=tali.perry1@gmail.com \
--cc=tmaimon77@gmail.com \
--cc=venture@google.com \
--cc=yuenn@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).