From: Mario Limonciello <mario.limonciello@amd.com>
To: Kurt Borja <kuurtb@gmail.com>
Cc: Dell.Client.Kernel@dell.com, hdegoede@redhat.com,
ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org, w_armin@gmx.de
Subject: Re: [PATCH 1/5] alienware-wmi: Simplify platform device creation
Date: Mon, 18 Nov 2024 22:36:02 -0600 [thread overview]
Message-ID: <66c669f5-ea49-40dd-846f-c5ecbc75380d@amd.com> (raw)
In-Reply-To: <20241119043429.25538-1-kuurtb@gmail.com>
On 11/18/2024 22:34, Kurt Borja wrote:
> Simplfy platform device creation by using
Typo
s/Simplfy/Simplify/
> platform_device_register_simple().
>
> Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Minor typo in commit message. LGTM otherwise.
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> drivers/platform/x86/dell/alienware-wmi.c | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c
> index 77465ed9b449..742fe79f13dc 100644
> --- a/drivers/platform/x86/dell/alienware-wmi.c
> +++ b/drivers/platform/x86/dell/alienware-wmi.c
> @@ -1196,14 +1196,13 @@ static int __init alienware_wmi_init(void)
> ret = platform_driver_register(&platform_driver);
> if (ret)
> goto fail_platform_driver;
> - platform_device = platform_device_alloc("alienware-wmi", PLATFORM_DEVID_NONE);
> - if (!platform_device) {
> - ret = -ENOMEM;
> +
> + platform_device = platform_device_register_simple("alienware-wmi",
> + PLATFORM_DEVID_NONE, NULL, 0);
> + if (IS_ERR(platform_device)) {
> + ret = PTR_ERR(platform_device);
> goto fail_platform_device1;
> }
> - ret = platform_device_add(platform_device);
> - if (ret)
> - goto fail_platform_device2;
>
> if (quirks->hdmi_mux > 0) {
> ret = create_hdmi(platform_device);
> @@ -1242,9 +1241,7 @@ static int __init alienware_wmi_init(void)
> fail_prep_deepsleep:
> fail_prep_amplifier:
> fail_prep_hdmi:
> - platform_device_del(platform_device);
> -fail_platform_device2:
> - platform_device_put(platform_device);
> + platform_device_unregister(platform_device);
> fail_platform_device1:
> platform_driver_unregister(&platform_driver);
> fail_platform_driver:
prev parent reply other threads:[~2024-11-19 4:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 4:34 Kurt Borja
2024-11-19 4:36 ` Mario Limonciello [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=66c669f5-ea49-40dd-846f-c5ecbc75380d@amd.com \
--to=mario.limonciello@amd.com \
--cc=Dell.Client.Kernel@dell.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kuurtb@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=w_armin@gmx.de \
/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
all inboxes | Powered by JetHome®