* [PATCH v2] ACPI / PMIC: constify platform_device_id
@ 2017-11-29 4:35 Arvind Yadav
2017-11-29 8:51 ` Mika Westerberg
0 siblings, 1 reply; 3+ messages in thread
From: Arvind Yadav @ 2017-11-29 4:35 UTC (permalink / raw)
To: rjw, lenb, andy, mika.westerberg; +Cc: linux-kernel, linux-acpi
platform_device_id are not supposed to change at runtime. All functions
working with platform_device_id provided by <linux/platform_device.h>
work with const platform_device_id. So mark the non-const structs as
const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
changes in v2:
Resend all changes as single patch.
drivers/acpi/pmic/intel_pmic_bxtwc.c | 2 +-
drivers/acpi/pmic/intel_pmic_chtwc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/pmic/intel_pmic_bxtwc.c b/drivers/acpi/pmic/intel_pmic_bxtwc.c
index 90011aa..2012d1d 100644
--- a/drivers/acpi/pmic/intel_pmic_bxtwc.c
+++ b/drivers/acpi/pmic/intel_pmic_bxtwc.c
@@ -400,7 +400,7 @@ static int intel_bxtwc_pmic_opregion_probe(struct platform_device *pdev)
&intel_bxtwc_pmic_opregion_data);
}
-static struct platform_device_id bxt_wc_opregion_id_table[] = {
+static const struct platform_device_id bxt_wc_opregion_id_table[] = {
{ .name = "bxt_wcove_region" },
{},
};
diff --git a/drivers/acpi/pmic/intel_pmic_chtwc.c b/drivers/acpi/pmic/intel_pmic_chtwc.c
index 85636d7..813b829 100644
--- a/drivers/acpi/pmic/intel_pmic_chtwc.c
+++ b/drivers/acpi/pmic/intel_pmic_chtwc.c
@@ -260,7 +260,7 @@ static int intel_cht_wc_pmic_opregion_probe(struct platform_device *pdev)
&intel_cht_wc_pmic_opregion_data);
}
-static struct platform_device_id cht_wc_opregion_id_table[] = {
+static const struct platform_device_id cht_wc_opregion_id_table[] = {
{ .name = "cht_wcove_region" },
{},
};
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ACPI / PMIC: constify platform_device_id
2017-11-29 4:35 [PATCH v2] ACPI / PMIC: constify platform_device_id Arvind Yadav
@ 2017-11-29 8:51 ` Mika Westerberg
2017-12-16 1:55 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Mika Westerberg @ 2017-11-29 8:51 UTC (permalink / raw)
To: Arvind Yadav; +Cc: rjw, lenb, andy, linux-kernel, linux-acpi
On Wed, Nov 29, 2017 at 10:05:02AM +0530, Arvind Yadav wrote:
> platform_device_id are not supposed to change at runtime. All functions
> working with platform_device_id provided by <linux/platform_device.h>
> work with const platform_device_id. So mark the non-const structs as
> const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ACPI / PMIC: constify platform_device_id
2017-11-29 8:51 ` Mika Westerberg
@ 2017-12-16 1:55 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2017-12-16 1:55 UTC (permalink / raw)
To: Mika Westerberg, Arvind Yadav; +Cc: lenb, andy, linux-kernel, linux-acpi
On Wednesday, November 29, 2017 9:51:32 AM CET Mika Westerberg wrote:
> On Wed, Nov 29, 2017 at 10:05:02AM +0530, Arvind Yadav wrote:
> > platform_device_id are not supposed to change at runtime. All functions
> > working with platform_device_id provided by <linux/platform_device.h>
> > work with const platform_device_id. So mark the non-const structs as
> > const.
> >
> > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Patch applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-16 1:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 4:35 [PATCH v2] ACPI / PMIC: constify platform_device_id Arvind Yadav
2017-11-29 8:51 ` Mika Westerberg
2017-12-16 1:55 ` 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;
as well as URLs for NNTP newsgroup(s).