From: Lothar Waßmann Date: Thu, 30 Jun 2016 10:31:42 +0000 (+0200) Subject: mxs_gpio: improve readability by using '(void *)' on right hand size of pointer initi... X-Git-Tag: KARO-TX-2016-07-05~3^2~3 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=1371dc3452847204d725ed713ca478b6b4c02d77;hp=fc8d7263cad464c80ba23fac6bc8abe4b6e37a39;ds=sidebyside mxs_gpio: improve readability by using '(void *)' on right hand size of pointer initializations --- diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c index a84123705b..f761104571 100644 --- a/drivers/gpio/mxs_gpio.c +++ b/drivers/gpio/mxs_gpio.c @@ -51,8 +51,7 @@ int gpio_get_value(unsigned gpio) { uint32_t bank = PAD_BANK(gpio); uint32_t offset = PINCTRL_DIN(bank); - struct mxs_register_32 *reg = - (struct mxs_register_32 *)(MXS_PINCTRL_BASE + offset); + struct mxs_register_32 *reg = (void *)(MXS_PINCTRL_BASE + offset); return (readl(®->reg) >> PAD_PIN(gpio)) & 1; } @@ -61,8 +60,7 @@ int gpio_set_value(unsigned gpio, int value) { uint32_t bank = PAD_BANK(gpio); uint32_t offset = PINCTRL_DOUT(bank); - struct mxs_register_32 *reg = - (struct mxs_register_32 *)(MXS_PINCTRL_BASE + offset); + struct mxs_register_32 *reg = (void *)(MXS_PINCTRL_BASE + offset); if (value) writel(1 << PAD_PIN(gpio), ®->reg_set); @@ -76,8 +74,7 @@ int gpio_direction_input(unsigned gpio) { uint32_t bank = PAD_BANK(gpio); uint32_t offset = PINCTRL_DOE(bank); - struct mxs_register_32 *reg = - (struct mxs_register_32 *)(MXS_PINCTRL_BASE + offset); + struct mxs_register_32 *reg = (void *)(MXS_PINCTRL_BASE + offset); writel(1 << PAD_PIN(gpio), ®->reg_clr); @@ -88,8 +85,7 @@ int gpio_direction_output(unsigned gpio, int value) { uint32_t bank = PAD_BANK(gpio); uint32_t offset = PINCTRL_DOE(bank); - struct mxs_register_32 *reg = - (struct mxs_register_32 *)(MXS_PINCTRL_BASE + offset); + struct mxs_register_32 *reg = (void *)(MXS_PINCTRL_BASE + offset); gpio_set_value(gpio, value);