qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 243cd13] musicpal: Clean up typecasts


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 243cd13] musicpal: Clean up typecasts
Date: Mon, 05 Oct 2009 14:53:17 -0000

From: Jan Kiszka <address@hidden>

Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/hw/musicpal.c b/hw/musicpal.c
index f92c442..e1dc6da 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -478,7 +478,7 @@ static void lcd_invalidate(void *opaque)
 
 static void musicpal_lcd_gpio_brigthness_in(void *opaque, int irq, int level)
 {
-    musicpal_lcd_state *s = (musicpal_lcd_state *) opaque;
+    musicpal_lcd_state *s = opaque;
     s->brightness &= ~(1 << irq);
     s->brightness |= level << irq;
 }
@@ -1011,7 +1011,7 @@ static void 
musicpal_gpio_brightness_update(musicpal_gpio_state *s) {
 
 static void musicpal_gpio_pin_event(void *opaque, int pin, int level)
 {
-    musicpal_gpio_state *s = (musicpal_gpio_state *) opaque;
+    musicpal_gpio_state *s = opaque;
     uint32_t mask = 1 << pin;
     uint32_t delta = level << pin;
     uint32_t old = s->in_state & mask;
@@ -1028,7 +1028,7 @@ static void musicpal_gpio_pin_event(void *opaque, int 
pin, int level)
 
 static uint32_t musicpal_gpio_read(void *opaque, target_phys_addr_t offset)
 {
-    musicpal_gpio_state *s = (musicpal_gpio_state *) opaque;
+    musicpal_gpio_state *s = opaque;
 
     switch (offset) {
     case MP_GPIO_OE_HI: /* used for LCD brightness control */
@@ -1067,7 +1067,7 @@ static uint32_t musicpal_gpio_read(void *opaque, 
target_phys_addr_t offset)
 static void musicpal_gpio_write(void *opaque, target_phys_addr_t offset,
                                 uint32_t value)
 {
-    musicpal_gpio_state *s = (musicpal_gpio_state *) opaque;
+    musicpal_gpio_state *s = opaque;
     switch (offset) {
     case MP_GPIO_OE_HI: /* used for LCD brightness control */
         s->lcd_brightness = (s->lcd_brightness & MP_GPIO_LCD_BRIGHTNESS) |
@@ -1176,7 +1176,7 @@ typedef struct musicpal_key_state {
 
 static void musicpal_key_event(void *opaque, int keycode)
 {
-    musicpal_key_state *s = (musicpal_key_state *) opaque;
+    musicpal_key_state *s = opaque;
     uint32_t event = 0;
     int i;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]