From: "Michel Dänzer" <michel@daenzer.net>
To: Alec Ari <neotheuser@ymail.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: Remove radeon DRM Kconfig forced options
Date: Mon, 25 Aug 2014 11:26:31 +0900 [thread overview]
Message-ID: <53FA9ED7.40100@daenzer.net> (raw)
In-Reply-To: <1408828294.88920.YahooMailNeo@web142603.mail.bf1.yahoo.com>
On 24.08.2014 06:11, Alec Ari wrote:
> Based against 3.17-rc1
>
> Makes POWER_SUPPLY HWMON and BACKLIGHT_CLASS_DEVICE optional
Please send a patch generated by git format-patch, preferably sent by
git sen-email.
> @@ -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,
#ifdef and #endif need to be at the start of the line.
> @@ -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);
> }
>
Might be better to move the guard inside radeon_hwmon_fini() than to
guard it at every call site.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
prev parent reply other threads:[~2014-08-25 2:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-23 21:11 Remove radeon DRM Kconfig forced options Alec Ari
2014-08-25 2:26 ` Michel Dänzer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53FA9ED7.40100@daenzer.net \
--to=michel@daenzer.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=neotheuser@ymail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.