drivers/extcon: Fix incompatible pointer type warning
PATCH 1/1 drivers/extcon: Fix incompatible pointer type warning
CC [M] drivers/extcon/extcon-adc-jack.o../drivers/extcon/extcon-adc-jack.c:115:52: error: incompatible pointer types passing 'const enum extcon *' to parameter of type 'const unsigned int *' [-Werror,-Wincompatible-pointer-types]
data->edev = devm_extcon_dev_allocate(&pdev->dev, pdata->cable_names);
^~~~~~~~~~~~~~~~~~
../include/linux/extcon.h:240:30: note: passing argument to parameter 'cable' here
const unsigned int *cable);
^1 error generated.
Signed-off-by Peter Foley <[email protected]>
--- include/linux/extcon/extcon-adc-jack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/extcon/extcon-adc-jack.h +1 -1
@@ -59,7 +59,7 @@ struct adc_jack_pdata {const char *name;const char *consumer_channel; -const enum extcon *cable_names; +const unsigned int *cable_names;/* The last entry's state should be 0 */ struct adc_jack_cond *adc_conditions;
Signature · 1 line
2.11.0.rc2
Quoted 7 lines · Peter Foley
CC [M]
drivers/extcon/extcon-adc-jack.o../drivers/extcon/extcon-adc-jack.c:115:52: error: incompatible pointer types passing 'const enum extcon *' to parameter of type 'const unsigned int *' [-Werror,-Wincompatible-pointer-types]data->edev = devm_extcon_dev_allocate(&pdev->dev, pdata->cable_names); ^~~~~~~~~~~~~~~~~~ ../include/linux/extcon.h:240:30: note: passing argument to parameter 'cable' here const unsigned int *cable); ^
Quoted 7 lines
1 error generated.
Signed-off-by Peter Foley <[email protected]>--- include/linux/extcon/extcon-adc-jack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied it. Thanks.
I modify the patch title as following:
- old : drivers/extcon: Fix incompatible pointer type warning
- new : extcon: adc-jack: Fix incompatible pointer type warning
Signature · 2 lines
Best Regards, Chanwoo Choi