mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ACPI: platform: Use PLATFORM_DEVID_NONE in acpi_create_platform_device()
@ 2022-09-01 10:04 John Garry
  2022-09-01 10:24 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: John Garry @ 2022-09-01 10:04 UTC (permalink / raw)
  To: rafael, lenb; +Cc: linux-acpi, linux-kernel, andy.shevchenko, John Garry

Instead of hardcoding the value for the id, use PLATFORM_DEVID_NONE.

Signed-off-by: John Garry <john.garry@huawei.com>

diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c
index de3cbf152dee..d33334c9b8e5 100644
--- a/drivers/acpi/acpi_platform.c
+++ b/drivers/acpi/acpi_platform.c
@@ -140,7 +140,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
 	pdevinfo.parent = adev->parent ?
 		acpi_get_first_physical_node(adev->parent) : NULL;
 	pdevinfo.name = dev_name(&adev->dev);
-	pdevinfo.id = -1;
+	pdevinfo.id = PLATFORM_DEVID_NONE;
 	pdevinfo.res = resources;
 	pdevinfo.num_res = count;
 	pdevinfo.fwnode = acpi_fwnode_handle(adev);
-- 
2.35.3


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

* Re: [PATCH] ACPI: platform: Use PLATFORM_DEVID_NONE in acpi_create_platform_device()
  2022-09-01 10:04 [PATCH] ACPI: platform: Use PLATFORM_DEVID_NONE in acpi_create_platform_device() John Garry
@ 2022-09-01 10:24 ` Andy Shevchenko
  2022-09-03 18:56   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2022-09-01 10:24 UTC (permalink / raw)
  To: John Garry
  Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
	Linux Kernel Mailing List

On Thu, Sep 1, 2022 at 1:10 PM John Garry <john.garry@huawei.com> wrote:
>
> Instead of hardcoding the value for the id, use PLATFORM_DEVID_NONE.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Signed-off-by: John Garry <john.garry@huawei.com>
>
> diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c
> index de3cbf152dee..d33334c9b8e5 100644
> --- a/drivers/acpi/acpi_platform.c
> +++ b/drivers/acpi/acpi_platform.c
> @@ -140,7 +140,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
>         pdevinfo.parent = adev->parent ?
>                 acpi_get_first_physical_node(adev->parent) : NULL;
>         pdevinfo.name = dev_name(&adev->dev);
> -       pdevinfo.id = -1;
> +       pdevinfo.id = PLATFORM_DEVID_NONE;
>         pdevinfo.res = resources;
>         pdevinfo.num_res = count;
>         pdevinfo.fwnode = acpi_fwnode_handle(adev);
> --
> 2.35.3
>


-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH] ACPI: platform: Use PLATFORM_DEVID_NONE in acpi_create_platform_device()
  2022-09-01 10:24 ` Andy Shevchenko
@ 2022-09-03 18:56   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2022-09-03 18:56 UTC (permalink / raw)
  To: Andy Shevchenko, John Garry
  Cc: Rafael J. Wysocki, Len Brown, ACPI Devel Maling List,
	Linux Kernel Mailing List

On Thu, Sep 1, 2022 at 12:25 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Thu, Sep 1, 2022 at 1:10 PM John Garry <john.garry@huawei.com> wrote:
> >
> > Instead of hardcoding the value for the id, use PLATFORM_DEVID_NONE.
>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>
> > Signed-off-by: John Garry <john.garry@huawei.com>
> >
> > diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c
> > index de3cbf152dee..d33334c9b8e5 100644
> > --- a/drivers/acpi/acpi_platform.c
> > +++ b/drivers/acpi/acpi_platform.c
> > @@ -140,7 +140,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
> >         pdevinfo.parent = adev->parent ?
> >                 acpi_get_first_physical_node(adev->parent) : NULL;
> >         pdevinfo.name = dev_name(&adev->dev);
> > -       pdevinfo.id = -1;
> > +       pdevinfo.id = PLATFORM_DEVID_NONE;
> >         pdevinfo.res = resources;
> >         pdevinfo.num_res = count;
> >         pdevinfo.fwnode = acpi_fwnode_handle(adev);
> > --

Applied as 6.1 material, thanks!

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

end of thread, other threads:[~2022-09-03 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 10:04 [PATCH] ACPI: platform: Use PLATFORM_DEVID_NONE in acpi_create_platform_device() John Garry
2022-09-01 10:24 ` Andy Shevchenko
2022-09-03 18:56   ` Rafael J. Wysocki

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®