All of lore.kernel.org
 help / color / mirror / Atom feed
* Remove radeon DRM Kconfig forced options
@ 2014-08-23 21:11 Alec Ari
  2014-08-25  2:26 ` Michel Dänzer
  0 siblings, 1 reply; 2+ messages in thread
From: Alec Ari @ 2014-08-23 21:11 UTC (permalink / raw)
  To: dri-devel@lists.freedesktop.org

[-- Attachment #1: Type: text/plain, Size: 85 bytes --]

Based against 3.17-rc1

Makes POWER_SUPPLY HWMON and BACKLIGHT_CLASS_DEVICE optional

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: radeon-kconfig.patch --]
[-- Type: text/x-patch; name="radeon-kconfig.patch", Size: 2293 bytes --]

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index b066bb3..1b7ee01 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -111,9 +111,6 @@ config DRM_RADEON
         select DRM_KMS_HELPER
 	select DRM_KMS_FB_HELPER
         select DRM_TTM
-	select POWER_SUPPLY
-	select HWMON
-	select BACKLIGHT_CLASS_DEVICE
 	select INTERVAL_TREE
 	help
 	  Choose this option if you have an ATI Radeon graphics card.  There
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 23314be..5743b7c 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -633,10 +633,12 @@ static const struct attribute_group hwmon_attrgroup = {
 	.is_visible = hwmon_attributes_visible,
 };
 
+#ifdef CONFIG_HWMON
 static const struct attribute_group *hwmon_groups[] = {
 	&hwmon_attrgroup,
 	NULL
 };
+#endif
 
 static int radeon_hwmon_init(struct radeon_device *rdev)
 {
@@ -653,9 +655,11 @@ static int radeon_hwmon_init(struct radeon_device *rdev)
 	case THERMAL_TYPE_KV:
 		if (rdev->asic->pm.get_temperature == NULL)
 			return err;
+		#ifdef CONFIG_HWMON
 		rdev->pm.int_hwmon_dev = hwmon_device_register_with_groups(rdev->dev,
 									   "radeon", rdev,
 									   hwmon_groups);
+		#endif
 		if (IS_ERR(rdev->pm.int_hwmon_dev)) {
 			err = PTR_ERR(rdev->pm.int_hwmon_dev);
 			dev_err(rdev->dev,
@@ -669,11 +673,13 @@ static int radeon_hwmon_init(struct radeon_device *rdev)
 	return err;
 }
 
+#ifdef CONFIG_HWMON
 static void radeon_hwmon_fini(struct radeon_device *rdev)
 {
 	if (rdev->pm.int_hwmon_dev)
 		hwmon_device_unregister(rdev->pm.int_hwmon_dev);
 }
+#endif
 
 static void radeon_dpm_thermal_work_handler(struct work_struct *work)
 {
@@ -1398,8 +1404,9 @@ static void radeon_pm_fini_old(struct radeon_device *rdev)
 		device_remove_file(rdev->dev, &dev_attr_power_profile);
 		device_remove_file(rdev->dev, &dev_attr_power_method);
 	}
-
+	#ifdef CONFIG_HWMON
 	radeon_hwmon_fini(rdev);
+	#endif
 	kfree(rdev->pm.power_state);
 }
 
@@ -1417,8 +1424,9 @@ static void radeon_pm_fini_dpm(struct radeon_device *rdev)
 		device_remove_file(rdev->dev, &dev_attr_power_method);
 	}
 	radeon_dpm_fini(rdev);
-
+	#ifdef CONFIG_HWMON
 	radeon_hwmon_fini(rdev);
+	#endif
 	kfree(rdev->pm.power_state);
 }
 

[-- Attachment #3: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-25  2:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-23 21:11 Remove radeon DRM Kconfig forced options Alec Ari
2014-08-25  2:26 ` Michel Dänzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.