Merge tag 'hwmon-for-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
[linux-2.6-block.git] / drivers / hwmon / npcm750-pwm-fan.c
index b998f9fbed41e3fd854625f1a399936efd84835b..b3b907bdfb635ab37b0ea3699ed3b5b90c993385 100644 (file)
@@ -52,7 +52,7 @@
 
 /* Define the Counter Register, value = 100 for match 100% */
 #define NPCM7XX_PWM_COUNTER_DEFAULT_NUM                255
-#define NPCM7XX_PWM_CMR_DEFAULT_NUM            127
+#define NPCM7XX_PWM_CMR_DEFAULT_NUM            255
 #define NPCM7XX_PWM_CMR_MAX                    255
 
 /* default all PWM channels PRESCALE2 = 1 */
@@ -861,7 +861,7 @@ static int npcm7xx_create_pwm_cooling(struct device *dev,
                dev_err(dev, "Property 'cooling-levels' cannot be read.\n");
                return ret;
        }
-       snprintf(cdev->name, THERMAL_NAME_LENGTH, "%s%d", child->name,
+       snprintf(cdev->name, THERMAL_NAME_LENGTH, "%pOFn%d", child,
                 pwm_port);
 
        cdev->tcdev = thermal_of_cooling_device_register(child,