* [PATCH] mfd: max8997: cast void pointer to data of max8997_pmic_dt_match
@ 2013-08-01 2:01 Jingoo Han
2013-08-01 8:52 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2013-08-01 2:01 UTC (permalink / raw)
To: 'Samuel Ortiz', 'Lee Jones'
Cc: linux-kernel, MyungJoo Ham, Thomas Abraham, 'Jingoo Han'
Casting (void *) data of max8997_pmic_dt_match is necessary,
because variable 'data' of struct 'of_device_id' is defined as
'const void *data'. Thus, pointer should be used instead of value.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/mfd/max8997.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
index 1471405..e6d668a 100644
--- a/drivers/mfd/max8997.c
+++ b/drivers/mfd/max8997.c
@@ -51,7 +51,7 @@ static struct mfd_cell max8997_devs[] = {
#ifdef CONFIG_OF
static struct of_device_id max8997_pmic_dt_match[] = {
- { .compatible = "maxim,max8997-pmic", .data = TYPE_MAX8997 },
+ { .compatible = "maxim,max8997-pmic", .data = (void *)TYPE_MAX8997 },
{},
};
#endif
--
1.7.10.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: max8997: cast void pointer to data of max8997_pmic_dt_match
2013-08-01 2:01 [PATCH] mfd: max8997: cast void pointer to data of max8997_pmic_dt_match Jingoo Han
@ 2013-08-01 8:52 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2013-08-01 8:52 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Samuel Ortiz', linux-kernel, MyungJoo Ham, Thomas Abraham
On Thu, 01 Aug 2013, Jingoo Han wrote:
> Casting (void *) data of max8997_pmic_dt_match is necessary,
> because variable 'data' of struct 'of_device_id' is defined as
> 'const void *data'. Thus, pointer should be used instead of value.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> drivers/mfd/max8997.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c
> index 1471405..e6d668a 100644
> --- a/drivers/mfd/max8997.c
> +++ b/drivers/mfd/max8997.c
> @@ -51,7 +51,7 @@ static struct mfd_cell max8997_devs[] = {
>
> #ifdef CONFIG_OF
> static struct of_device_id max8997_pmic_dt_match[] = {
> - { .compatible = "maxim,max8997-pmic", .data = TYPE_MAX8997 },
> + { .compatible = "maxim,max8997-pmic", .data = (void *)TYPE_MAX8997 },
> {},
> };
> #endif
Applied, thanks.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-01 8:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-01 2:01 [PATCH] mfd: max8997: cast void pointer to data of max8997_pmic_dt_match Jingoo Han
2013-08-01 8:52 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome