From: Ben Skeggs Date: Mon, 4 Nov 2013 23:58:27 +0000 (+1000) Subject: drm/nouveau/therm: no toggle fan control either if we can't guarantee no pwm connected X-Git-Tag: v3.13-rc8~13^2~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21b1ed10df1797dbcd05ff9fd1175f0c7de2bb19;p=kernel%2Fkernel-generic.git drm/nouveau/therm: no toggle fan control either if we can't guarantee no pwm connected Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/fantog.c b/drivers/gpu/drm/nouveau/core/subdev/therm/fantog.c index e601773..f69dab1 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/fantog.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/fantog.c @@ -97,6 +97,13 @@ nouveau_fantog_create(struct nouveau_therm *therm, struct dcb_gpio_func *func) { struct nouveau_therm_priv *tpriv = (void *)therm; struct nouveau_fantog_priv *priv; + int ret; + + if (therm->pwm_ctrl) { + ret = therm->pwm_ctrl(therm, func->line, false); + if (ret) + return ret; + } priv = kzalloc(sizeof(*priv), GFP_KERNEL); tpriv->fan = &priv->base;