aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2022-05-05 21:15:33 +0900
committer坂本 貴史 <o-takashi@sakamocchi.jp>2022-05-06 08:31:24 +0900
commit7e27ea5841227910b26e9239a88b08a7338ae323 (patch)
treeaea5ccd52a1edff15b3e15bace9f0844788d251d
parentedb62dffbf50d544fc3c5a27ca87601bebb23015 (diff)
downloadlibhinoko-7e27ea5841227910b26e9239a88b08a7338ae323.tar.gz
fw_iso_tx: fix the position of declaration for automatic variables
Fixes: 697bb2d6bcbd ("fw_iso_ctx: code refactoring to dispatch iso interrupt events") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r--src/fw_iso_tx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fw_iso_tx.c b/src/fw_iso_tx.c
index ed91a71..9d8b407 100644
--- a/src/fw_iso_tx.c
+++ b/src/fw_iso_tx.c
@@ -163,6 +163,9 @@ gboolean fw_iso_tx_handle_event(HinokoFwIsoCtx *inst, const union fw_cdev_event
HinokoFwIsoTxPrivate *priv;
const struct fw_cdev_event_iso_interrupt *ev;
+ guint sec;
+ guint cycle;
+ unsigned int pkt_count;
g_return_val_if_fail(HINOKO_FW_ISO_TX(inst), FALSE);
g_return_val_if_fail(event->common.type == FW_CDEV_EVENT_ISO_INTERRUPT, FALSE);
@@ -172,9 +175,9 @@ gboolean fw_iso_tx_handle_event(HinokoFwIsoCtx *inst, const union fw_cdev_event
ev = &event->iso_interrupt;
- guint sec = (ev->cycle & 0x0000e000) >> 13;
- guint cycle = ev->cycle & 0x00001fff;
- unsigned int pkt_count = ev->header_length / 4;
+ sec = (ev->cycle & 0x0000e000) >> 13;
+ cycle = ev->cycle & 0x00001fff;
+ pkt_count = ev->header_length / 4;
g_signal_emit(inst, fw_iso_tx_sigs[FW_ISO_TX_SIG_TYPE_IRQ], 0, sec, cycle, ev->header,
ev->header_length, pkt_count);