Commit 7ba9936f authored by Dimitris Lampridis's avatar Dimitris Lampridis Committed by Dimitris Lampridis

sw: fix uninitialized pointer

parent b8038975
...@@ -106,7 +106,7 @@ static void adcout_output (struct wrtd_adcout_dev *dev) ...@@ -106,7 +106,7 @@ static void adcout_output (struct wrtd_adcout_dev *dev)
struct adcout_out_queue *q = &dev->queue; struct adcout_out_queue *q = &dev->queue;
struct wrtd_event *ev = adcout_out_queue_front(q); struct wrtd_event *ev = adcout_out_queue_front(q);
uint32_t ctrl = adcout_readl(dev, ALT_TRIGIN_CTRL); uint32_t ctrl = adcout_readl(dev, ALT_TRIGIN_CTRL);
struct wrtd_tstamp *ts; struct wrtd_tstamp ts;
/* Check if the output has triggered */ /* Check if the output has triggered */
if (!dev->idle) { if (!dev->idle) {
...@@ -155,14 +155,14 @@ static void adcout_output (struct wrtd_adcout_dev *dev) ...@@ -155,14 +155,14 @@ static void adcout_output (struct wrtd_adcout_dev *dev)
wrtd_log(WRTD_LOG_MSG_EV_CONSUMED, WRTD_LOG_CONSUMED_START, wrtd_log(WRTD_LOG_MSG_EV_CONSUMED, WRTD_LOG_CONSUMED_START,
NULL, ev, NULL); NULL, ev, NULL);
ts_add3_ns (ts, &ev->ts, 8000); ts_add3_ns (&ts, &ev->ts, 8000);
/* /*
* Store the last programmed timestamp (+ some margin) and mark * Store the last programmed timestamp (+ some margin) and mark
* the output as busy * the output as busy
*/ */
q->last_programmed_sec = ts->seconds; q->last_programmed_sec = ts.seconds;
q->last_programmed_ns = ts->ns; q->last_programmed_ns = ts.ns;
dev->idle = 0; dev->idle = 0;
} }
......
...@@ -198,7 +198,7 @@ static void fd_output (struct wrtd_fd_dev *fd, unsigned channel) ...@@ -198,7 +198,7 @@ static void fd_output (struct wrtd_fd_dev *fd, unsigned channel)
struct lrt_pulse_queue *q = &out->queue; struct lrt_pulse_queue *q = &out->queue;
struct wrtd_event *ev = pulse_queue_front(q); struct wrtd_event *ev = pulse_queue_front(q);
uint32_t dcr = fd_ch_readl(out, FD_REG_DCR); uint32_t dcr = fd_ch_readl(out, FD_REG_DCR);
struct wrtd_tstamp *ts; struct wrtd_tstamp ts;
/* Check if the output has triggered */ /* Check if the output has triggered */
if (!out->idle) { if (!out->idle) {
...@@ -242,11 +242,11 @@ static void fd_output (struct wrtd_fd_dev *fd, unsigned channel) ...@@ -242,11 +242,11 @@ static void fd_output (struct wrtd_fd_dev *fd, unsigned channel)
FD_REG_F_START); FD_REG_F_START);
/* Adjust pulse width and program the output end time */ /* Adjust pulse width and program the output end time */
ts_add3_ns(ts, &ev->ts, out->width_ns); ts_add3_ns(&ts, &ev->ts, out->width_ns);
fd_ch_writel(out, ts->seconds, FD_REG_U_ENDL); fd_ch_writel(out, ts.seconds, FD_REG_U_ENDL);
fd_ch_writel(out, ts->ns / 8, FD_REG_C_END); fd_ch_writel(out, ts.ns / 8, FD_REG_C_END);
fd_ch_writel(out, ((ts->ns & 7) << 9) | (ts->frac >> (32 - 9)), fd_ch_writel(out, ((ts.ns & 7) << 9) | (ts.frac >> (32 - 9)),
FD_REG_F_END); FD_REG_F_END);
fd_ch_writel(out, 0, FD_REG_RCR); fd_ch_writel(out, 0, FD_REG_RCR);
fd_ch_writel(out, FD_DCR_MODE, FD_REG_DCR); fd_ch_writel(out, FD_DCR_MODE, FD_REG_DCR);
...@@ -257,14 +257,14 @@ static void fd_output (struct wrtd_fd_dev *fd, unsigned channel) ...@@ -257,14 +257,14 @@ static void fd_output (struct wrtd_fd_dev *fd, unsigned channel)
wrtd_log(WRTD_LOG_MSG_EV_CONSUMED, WRTD_LOG_CONSUMED_START, wrtd_log(WRTD_LOG_MSG_EV_CONSUMED, WRTD_LOG_CONSUMED_START,
NULL, ev, NULL); NULL, ev, NULL);
ts_add2_ns (ts, 8000); ts_add2_ns (&ts, 8000);
/* /*
* Store the last programmed timestamp (+ some margin) and mark * Store the last programmed timestamp (+ some margin) and mark
* the output as busy * the output as busy
*/ */
out->last_programmed_sec = ts->seconds; out->last_programmed_sec = ts.seconds;
out->last_programmed_ns = ts->ns; out->last_programmed_ns = ts.ns;
out->idle = 0; out->idle = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment