aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/gpio/omap_gpio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c
index bd0841d..12ec16d 100644
--- a/hw/gpio/omap_gpio.c
+++ b/hw/gpio/omap_gpio.c
@@ -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)