From: "Wilczynski, Michal" <michal.wilczynski@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: Re: [PATCH v1 4/5] ACPI: thermal: Move acpi_thermal_driver definition
Date: Wed, 31 May 2023 10:03:10 +0200 [thread overview]
Message-ID: <3f8697c3-f99e-e467-3926-5a574d4c6bd4@intel.com> (raw)
In-Reply-To: <21889638.EfDdHjke4D@kreacher>
On 5/30/2023 5:44 PM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Move the definition of the acpi_thermal_driver structure closer to the
> initialization code that registes the driver, so some function forward
registe -> registers
I heard some people use 'codespell' for some automatic checking, but haven't
used that so far
> declarations can be dropped.
>
> Also move the module information to the end of the file where it is
> usually located.
>
> No functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/acpi/thermal.c | 66 +++++++++++++++++++++++--------------------------
> 1 file changed, 31 insertions(+), 35 deletions(-)
>
> Index: linux-pm/drivers/acpi/thermal.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/thermal.c
> +++ linux-pm/drivers/acpi/thermal.c
> @@ -70,10 +70,6 @@ do { \
> "Please report to linux-acpi@vger.kernel.org\n", str); \
> } while (0)
>
> -MODULE_AUTHOR("Paul Diefenbaugh");
> -MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
> -MODULE_LICENSE("GPL");
> -
> static int act;
> module_param(act, int, 0644);
> MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.");
> @@ -100,37 +96,6 @@ MODULE_PARM_DESC(psv, "Disable or overri
>
> static struct workqueue_struct *acpi_thermal_pm_queue;
>
> -static int acpi_thermal_add(struct acpi_device *device);
> -static void acpi_thermal_remove(struct acpi_device *device);
> -static void acpi_thermal_notify(struct acpi_device *device, u32 event);
> -
> -static const struct acpi_device_id thermal_device_ids[] = {
> - {ACPI_THERMAL_HID, 0},
> - {"", 0},
> -};
> -MODULE_DEVICE_TABLE(acpi, thermal_device_ids);
> -
> -#ifdef CONFIG_PM_SLEEP
> -static int acpi_thermal_suspend(struct device *dev);
> -static int acpi_thermal_resume(struct device *dev);
> -#else
> -#define acpi_thermal_suspend NULL
> -#define acpi_thermal_resume NULL
> -#endif
> -static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, acpi_thermal_suspend, acpi_thermal_resume);
> -
> -static struct acpi_driver acpi_thermal_driver = {
> - .name = "thermal",
> - .class = ACPI_THERMAL_CLASS,
> - .ids = thermal_device_ids,
> - .ops = {
> - .add = acpi_thermal_add,
> - .remove = acpi_thermal_remove,
> - .notify = acpi_thermal_notify,
> - },
> - .drv.pm = &acpi_thermal_pm,
> -};
> -
> struct acpi_thermal_state {
> u8 critical:1;
> u8 hot:1;
> @@ -1131,6 +1096,33 @@ static int acpi_thermal_resume(struct de
> }
> #endif
>
> +static const struct acpi_device_id thermal_device_ids[] = {
> + {ACPI_THERMAL_HID, 0},
> + {"", 0},
> +};
> +MODULE_DEVICE_TABLE(acpi, thermal_device_ids);
> +
> +#ifdef CONFIG_PM_SLEEP
> +static int acpi_thermal_suspend(struct device *dev);
> +static int acpi_thermal_resume(struct device *dev);
> +#else
> +#define acpi_thermal_suspend NULL
> +#define acpi_thermal_resume NULL
> +#endif
> +static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, acpi_thermal_suspend, acpi_thermal_resume);
> +
> +static struct acpi_driver acpi_thermal_driver = {
> + .name = "thermal",
> + .class = ACPI_THERMAL_CLASS,
> + .ids = thermal_device_ids,
> + .ops = {
> + .add = acpi_thermal_add,
> + .remove = acpi_thermal_remove,
> + .notify = acpi_thermal_notify,
> + },
> + .drv.pm = &acpi_thermal_pm,
> +};
> +
> static int thermal_act(const struct dmi_system_id *d) {
> if (act == 0) {
> pr_notice("%s detected: disabling all active thermal trip points\n",
> @@ -1235,3 +1227,7 @@ static void __exit acpi_thermal_exit(voi
>
> module_init(acpi_thermal_init);
> module_exit(acpi_thermal_exit);
> +
> +MODULE_AUTHOR("Paul Diefenbaugh");
> +MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
> +MODULE_LICENSE("GPL");
>
Reviewed-by: Michal Wilczynski <michal.wilczynski@intel.com>
>
next prev parent reply other threads:[~2023-05-31 8:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 15:39 [PATCH v1 0/5] ACPI: thermal: Assorted cleanups Rafael J. Wysocki
2023-05-30 15:44 ` [PATCH v1 1/5] ACPI: thermal: Use BIT() macro for defining flags Rafael J. Wysocki
2023-05-31 7:33 ` Wilczynski, Michal
2023-05-30 15:44 ` [PATCH v1 2/5] ACPI: thermal: Drop redundant ACPI_TRIPS_REFRESH_DEVICES symbol Rafael J. Wysocki
2023-05-31 7:48 ` Wilczynski, Michal
2023-05-31 14:48 ` Rafael J. Wysocki
2023-05-30 15:44 ` [PATCH v1 3/5] ACPI: thermal: Move symbol definitions to one place Rafael J. Wysocki
2023-05-31 7:58 ` Wilczynski, Michal
2023-05-30 15:44 ` [PATCH v1 4/5] ACPI: thermal: Move acpi_thermal_driver definition Rafael J. Wysocki
2023-05-31 8:03 ` Wilczynski, Michal [this message]
2023-05-30 15:45 ` [PATCH v1 5/5] ACPI: thermal: Eliminate struct acpi_thermal_state_flags Rafael J. Wysocki
2023-05-31 8:20 ` Wilczynski, Michal
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=3f8697c3-f99e-e467-3926-5a574d4c6bd4@intel.com \
--to=michal.wilczynski@intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox