Skip to content

Commit

Permalink
gpio: 74xx: Fix build warning about void to integer cast
Browse files Browse the repository at this point in the history
This fixes the build warning , warning: cast from pointer to integer
of different size when building this file on a x86 allmodconfig
configuration. In order for me to fix this build warning I changed
the cast in the function mmio_74xx_gpio_probe from casting the
variable data of the stucture pointer of_id to uintptr_t rather
then unsigned when assigning to the variable flag of the structure
pointer priv of the structure type mmio_74xx_gpio_priv.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Nicholas Krause authored and Linus Walleij committed Jul 16, 2015
1 parent 3726960 commit 5444265
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-74xx-mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static int mmio_74xx_gpio_probe(struct platform_device *pdev)
if (IS_ERR(dat))
return PTR_ERR(dat);

priv->flags = (unsigned)of_id->data;
priv->flags = (uintptr_t) of_id->data;

err = bgpio_init(&priv->bgc, &pdev->dev,
DIV_ROUND_UP(MMIO_74XX_BIT_CNT(priv->flags), 8),
Expand Down

0 comments on commit 5444265

Please sign in to comment.