Based against 3.17-rc1 Makes POWER_SUPPLY HWMON and BACKLIGHT_CLASS_DEVICE optional
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); }
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel