Skip to content

Commit 1d4d673

Browse files
tititiou36groeck
authored andcommitted
hwmon: (npcm750-pwm-fan) Remove another unused field in struct npcm7xx_cooling_device
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> Link: https://lore.kernel.org/r/2ff738663d40ac5ae3d0b4d2e688ff7e36032be8.1714505655.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent cfdafdd commit 1d4d673

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/hwmon/npcm750-pwm-fan.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ struct npcm7xx_pwm_fan_data {
196196
void __iomem *pwm_base;
197197
void __iomem *fan_base;
198198
int pwm_modules;
199-
unsigned long pwm_clk_freq;
200199
struct clk *pwm_clk;
201200
struct clk *fan_clk;
202201
struct mutex pwm_lock[NPCM7XX_PWM_MAX_MODULES];
@@ -691,11 +690,12 @@ static u32 npcm7xx_pwm_init(struct npcm7xx_pwm_fan_data *data)
691690
{
692691
int m, ch;
693692
u32 prescale_val, output_freq;
693+
unsigned long pwm_clk_freq;
694694

695-
data->pwm_clk_freq = clk_get_rate(data->pwm_clk);
695+
pwm_clk_freq = clk_get_rate(data->pwm_clk);
696696

697697
/* Adjust NPCM7xx PWMs output frequency to ~25Khz */
698-
output_freq = data->pwm_clk_freq / PWN_CNT_DEFAULT;
698+
output_freq = pwm_clk_freq / PWN_CNT_DEFAULT;
699699
prescale_val = DIV_ROUND_CLOSEST(output_freq, PWM_OUTPUT_FREQ_25KHZ);
700700

701701
/* If prescale_val = 0, then the prescale output clock is stopped */

0 commit comments

Comments
 (0)