aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Milmore <ken.milmore@googlemail.com>2011-07-03 14:54:28 -0400
committerBen Skeggs <bskeggs@redhat.com>2011-09-20 02:07:59 -0400
commit658e86ee2db9500aea529a04008cce10972416bc (patch)
tree22e11b22bd0b76b2f6442b99a85dfe5882cd0e44
parent37b034a64bef9ba36c504eb7717d2a5537cdef6b (diff)
drm/nouveau: enable hwmon support when both nouveau/hwmon are built as modules.
The nouveau hwmon temperature support currently only functions when hwmon is compiled into the kernel. There's no reason why this shouldn't also work when both hwmon and nouveau are modularised (as is the case with Slackware's stock kernels). Signed-off-by: Ken Milmore <ken.milmore@googlemail.com> Reviewed-by: Martin Peres <martin.peres@ensi-bourges.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_pm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index db68531b8114..a539fd257921 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -312,7 +312,7 @@ nouveau_sysfs_fini(struct drm_device *dev)
312 } 312 }
313} 313}
314 314
315#ifdef CONFIG_HWMON 315#if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE))
316static ssize_t 316static ssize_t
317nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf) 317nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf)
318{ 318{
@@ -429,7 +429,7 @@ static const struct attribute_group hwmon_attrgroup = {
429static int 429static int
430nouveau_hwmon_init(struct drm_device *dev) 430nouveau_hwmon_init(struct drm_device *dev)
431{ 431{
432#ifdef CONFIG_HWMON 432#if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE))
433 struct drm_nouveau_private *dev_priv = dev->dev_private; 433 struct drm_nouveau_private *dev_priv = dev->dev_private;
434 struct nouveau_pm_engine *pm = &dev_priv->engine.pm; 434 struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
435 struct device *hwmon_dev; 435 struct device *hwmon_dev;
@@ -462,7 +462,7 @@ nouveau_hwmon_init(struct drm_device *dev)
462static void 462static void
463nouveau_hwmon_fini(struct drm_device *dev) 463nouveau_hwmon_fini(struct drm_device *dev)
464{ 464{
465#ifdef CONFIG_HWMON 465#if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE))
466 struct drm_nouveau_private *dev_priv = dev->dev_private; 466 struct drm_nouveau_private *dev_priv = dev->dev_private;
467 struct nouveau_pm_engine *pm = &dev_priv->engine.pm; 467 struct nouveau_pm_engine *pm = &dev_priv->engine.pm;
468 468