Skip to content

Commit

Permalink
hw/gpio/omap_gpio: Add local variable to avoid embedded cast
Browse files Browse the repository at this point in the history
Add a local 'struct omap_gpif_s *' variable to improve readability.
(This also eases next commit conversion).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230109140306.23161-3-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
philmd authored and pm215 committed Jan 12, 2023
1 parent c4d15af commit 2818015
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/gpio/omap_gpio.c
Expand Up @@ -53,7 +53,8 @@ struct omap_gpif_s {
/* General-Purpose I/O of OMAP1 */
static void omap_gpio_set(void *opaque, int line, int level)
{
struct omap_gpio_s *s = &((struct omap_gpif_s *) opaque)->omap1;
struct omap_gpif_s *p = opaque;
struct omap_gpio_s *s = &p->omap1;
uint16_t prev = s->inputs;

if (level)
Expand Down

0 comments on commit 2818015

Please sign in to comment.