/* FIXME: does this test work properly? */
#if (BITS_PER_LONG == 32)
-static inline void save_last_tsc(struct ltt_channel_buf_struct *ltt_buf,
+static inline void save_last_tsc(struct ust_buffer *ltt_buf,
u64 tsc)
{
ltt_buf->last_tsc = (unsigned long)(tsc >> LTT_TSC_BITS);
}
-static inline int last_tsc_overflow(struct ltt_channel_buf_struct *ltt_buf,
+static inline int last_tsc_overflow(struct ust_buffer *ltt_buf,
u64 tsc)
{
unsigned long tsc_shifted = (unsigned long)(tsc >> LTT_TSC_BITS);
struct ust_buffer *ltt_buf = channel->buf;
long cons_off;
+ /*
+ * Can be called in the error path of allocation when
+ * trans_channel_data is not yet set.
+ */
+ if (!channel)
+ return;
+
for (cons_off = atomic_long_read(<t_buf->consumed);
(SUBBUF_TRUNC(local_read(<t_buf->offset),
channel)