mfd: max8997: cast void pointer to data of max8997_pmic_dt_match
PATCH 1/1 mfd: max8997: cast void pointer to data of max8997_pmic_dt_match
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 <[email protected]>
--- drivers/mfd/max8997.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/max8997.c +1 -1
@@ -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
Signature · 1 line
1.7.10.4
Lee Jones
AppliedQuoted 14 lines · Jingoo Han
Casting (void *) data of
max8997_pmic_dt_matchis 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 <[email protected]>--- drivers/mfd/max8997.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mfd/max8997.c +0
-0
drivers/mfd/max8997.c static struct mfd_cell max8997_devs[] = { · line 57
Quoted 8 lines
drivers/mfd/max8997.c +1
-1@@ -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.
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog