From 1371dc3452847204d725ed713ca478b6b4c02d77 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Thu, 30 Jun 2016 12:31:42 +0200 Subject: [PATCH 1/1] mxs_gpio: improve readability by using '(void *)' on right hand size of pointer initializations --- drivers/gpio/mxs_gpio.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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); -- 2.39.2